Unverified Commit bcd1ba62 authored by Rafau's avatar Rafau Committed by GitHub

[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
parent 1409cd6e
...@@ -710,6 +710,7 @@ export default async function getBaseWebpackConfig( ...@@ -710,6 +710,7 @@ export default async function getBaseWebpackConfig(
ignored: ['**/.git/**', '**/node_modules/**', '**/.next/**'], ignored: ['**/.git/**', '**/node_modules/**', '**/.next/**'],
}, },
output: { output: {
...(isWebpack5 ? { ecmaVersion: 5 } : {}),
path: outputPath, path: outputPath,
// On the server we don't use the chunkhash // On the server we don't use the chunkhash
filename: isServer filename: isServer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment