Skip to content

Commit

Permalink
you can't assign to undeclared globals in strict mode so we declare i…
Browse files Browse the repository at this point in the history
…t as var
  • Loading branch information
sokra committed Mar 16, 2021
1 parent 423395b commit 0328add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ export default async function getBaseWebpackConfig(
: '[name].js'
: `static/chunks/[name]${dev ? '' : '-[chunkhash]'}.js`,
library: isServer ? undefined : '_N_E',
libraryTarget: isServer ? 'commonjs2' : 'assign',
libraryTarget: isServer ? 'commonjs2' : 'var',
hotUpdateChunkFilename: isWebpack5
? 'static/webpack/[id].[fullhash].hot-update.js'
: 'static/webpack/[id].[hash].hot-update.js',
Expand Down

0 comments on commit 0328add

Please sign in to comment.