[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:
Rafau 2020-07-31 10:50:54 +02:00 committed by GitHub
parent 1409cd6e3f
commit bcd1ba622e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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