Upgrade to Next.js 16 with Turbopack and Contentlayer2

- Upgraded Next.js to v16, React to v19
- Migrated from contentlayer to contentlayer2
- Migrated to Turbopack by decoupling Contentlayer from webpack
- Updated all page components to handle async params (Next.js 15+ breaking change)
- Changed package.json to type: module and renamed config files to .cjs
- Updated README with current tech stack and article creation instructions
- Fixed tag encoding issue (removed double encoding)
- All security vulnerabilities resolved (npm audit: 0 vulnerabilities)
This commit is contained in:
2025-11-19 22:43:14 +08:00
parent 4c08413936
commit a4db9688b6
11 changed files with 1435 additions and 427 deletions

View File

@@ -1,20 +1,9 @@
import { withContentlayer } from 'next-contentlayer2';
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: []
},
webpack: (config) => {
config.ignoreWarnings = [
...(config.ignoreWarnings || []),
// Contentlayer dynamic import / cache analysis warnings
/@contentlayer\/core[\\/]dist[\\/]dynamic-build\.js/,
/@contentlayer\/core[\\/]dist[\\/]getConfig[\\/]index\.js/,
/@contentlayer\/core[\\/]dist[\\/]generation[\\/]generate-dotpkg\.js/
];
return config;
}
};
export default withContentlayer(nextConfig);
export default nextConfig;