locale upgrade
This commit is contained in:
@@ -33,14 +33,15 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
|
||||
// Performance optimizations
|
||||
// NOTE: `optimizePackageImports` can cause dev-time webpack runtime issues with some setups.
|
||||
// Keep it enabled for production builds only.
|
||||
experimental:
|
||||
process.env.NODE_ENV === "production"
|
||||
? {
|
||||
optimizePackageImports: ["lucide-react", "framer-motion"],
|
||||
}
|
||||
: {},
|
||||
: {
|
||||
// In development, enable webpack build worker for faster builds
|
||||
webpackBuildWorker: true,
|
||||
},
|
||||
|
||||
// Image optimization
|
||||
images: {
|
||||
@@ -63,7 +64,7 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
|
||||
// Webpack configuration
|
||||
webpack: (config) => {
|
||||
webpack: (config, { dev, isServer }) => {
|
||||
// Fix for module resolution issues
|
||||
config.resolve.fallback = {
|
||||
...config.resolve.fallback,
|
||||
@@ -72,6 +73,27 @@ const nextConfig: NextConfig = {
|
||||
tls: false,
|
||||
};
|
||||
|
||||
// Optimize webpack cache - fix "Serializing big strings" warnings in dev by avoiding FS cache
|
||||
if (dev) {
|
||||
config.cache = {
|
||||
type: "memory",
|
||||
maxGenerations: 5,
|
||||
};
|
||||
|
||||
if (!isServer) {
|
||||
// Optimize module concatenation and chunking for the client build
|
||||
config.optimization = {
|
||||
...config.optimization,
|
||||
moduleIds: "deterministic",
|
||||
chunkIds: "deterministic",
|
||||
splitChunks: {
|
||||
...config.optimization?.splitChunks,
|
||||
maxSize: 200000, // keep chunks <200KB to avoid large-string serialization
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user