Skip to content

Commit 8c8796c

Browse files
authored
chore: Fixes npm run build && npm run start (#3889)
1 parent 5c81eb8 commit 8c8796c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pages/webpack.config.base.cjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ module.exports = ({
2424
moduleReplacements,
2525
react18,
2626
} = {}) => {
27+
const mode = process.env.NODE_ENV;
2728
return {
2829
stats: isProd ? 'none' : 'minimal',
2930
context: path.resolve(__dirname),
3031
entry: './app/index.tsx',
31-
mode: process.env.NODE_ENV,
32+
mode,
3233
output: {
3334
path: path.resolve(outputPath),
3435
publicPath: './',
@@ -54,7 +55,7 @@ module.exports = ({
5455
},
5556
},
5657
devtool: 'source-map',
57-
cache: isLocal ? { type: 'filesystem', name: react18 ? 'react18' : 'react16' } : false,
58+
cache: isLocal ? { type: 'filesystem', name: react18 ? `${mode}:react18` : `${mode}:react16` } : false,
5859
module: {
5960
rules: [
6061
{

0 commit comments

Comments
 (0)