Stop minimization on non-production builds
This commit is contained in:
parent
6096eb75b3
commit
37351522cd
@ -38,6 +38,13 @@ const nextConfig = {
|
||||
...process.env.NEXT_PUBLIC_STATICALLY_OPTIMIZE === '1' && {
|
||||
experimental: { ppr: true },
|
||||
},
|
||||
webpack: (config) => {
|
||||
config.optimization ??= {};
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
config.optimization.minimize = false;
|
||||
}
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user