We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c81eb8 commit 8c8796cCopy full SHA for 8c8796c
pages/webpack.config.base.cjs
@@ -24,11 +24,12 @@ module.exports = ({
24
moduleReplacements,
25
react18,
26
} = {}) => {
27
+ const mode = process.env.NODE_ENV;
28
return {
29
stats: isProd ? 'none' : 'minimal',
30
context: path.resolve(__dirname),
31
entry: './app/index.tsx',
- mode: process.env.NODE_ENV,
32
+ mode,
33
output: {
34
path: path.resolve(outputPath),
35
publicPath: './',
@@ -54,7 +55,7 @@ module.exports = ({
54
55
},
56
57
devtool: 'source-map',
- cache: isLocal ? { type: 'filesystem', name: react18 ? 'react18' : 'react16' } : false,
58
+ cache: isLocal ? { type: 'filesystem', name: react18 ? `${mode}:react18` : `${mode}:react16` } : false,
59
module: {
60
rules: [
61
{
0 commit comments