[webpack5] Complile for ES5 (#15708)
I think this is necessary for IE11. via [Webpack docs](https://webpack.js.org/migrate/5/#turn-off-es2015-syntax-in-runtime-code-if-necessary) > By default, webpack's runtime code uses ES2015 syntax to build smaller bundles. If your build targets environments that don't support this syntax (like IE11), you'll need to set output.ecmaVersion: 5 to revert to ES5 syntax. Thank you
This commit is contained in:
parent
1409cd6e3f
commit
bcd1ba622e
1 changed files with 1 additions and 0 deletions
|
@ -710,6 +710,7 @@ export default async function getBaseWebpackConfig(
|
|||
ignored: ['**/.git/**', '**/node_modules/**', '**/.next/**'],
|
||||
},
|
||||
output: {
|
||||
...(isWebpack5 ? { ecmaVersion: 5 } : {}),
|
||||
path: outputPath,
|
||||
// On the server we don't use the chunkhash
|
||||
filename: isServer
|
||||
|
|
Loading…
Reference in a new issue