fix: resolve HMR error and TypeScript build issues
- Disable all experimental features to fix React 19 and Next.js 16 compatibility - Fix TypeScript error in check-permission.ts (role property issue) - Add test script for Contact page validation - Use production mode to avoid HMR issues completely
This commit is contained in:
+2
-2
@@ -25,8 +25,8 @@ const nextConfig: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
reactProductionProfiling: !isDev,
|
||||
experimental: {
|
||||
optimizePackageImports: ['lucide-react', 'framer-motion', '@radix-ui/react-dialog', '@radix-ui/react-dropdown-menu'],
|
||||
// 暂时禁用optimizeCss以解决React 19和Next.js 16的HMR兼容性问题
|
||||
// 暂时禁用所有实验性功能以解决React 19和Next.js 16的HMR兼容性问题
|
||||
// optimizePackageImports: ['lucide-react', 'framer-motion', '@radix-ui/react-dialog', '@radix-ui/react-dropdown-menu'],
|
||||
// optimizeCss: true,
|
||||
},
|
||||
compiler: {
|
||||
|
||||
Reference in New Issue
Block a user