80000f4238
Earlier today #17038 was merged which I opened to fix a problem when using `webpack@5.0.0-beta.30` with Next.js using the new Webpack 5 support. In that PR, the only change was the renaming of a configuration key. I later discovered that the change on the Webpack side was different than I initially thought, and this meant that the fix I submittted to Next.js didn't work. This PR intends to fix the remaining problems. Webpack 5 now accepts a `environment` key that can be used to configure the target output. Previously, this was known as `ecmaVersion` and accepted a number. Now, `environment` accepts a configuration object with individual options. I've configured this in such a way where it resembles an ES5 environment: ```js environment: { arrowFunction: false, bigIntLiteral: false, const: false, destructuring: false, dynamicImport: false, forOf: false, module: false, } ``` |
||
---|---|---|
.. | ||
create-next-app | ||
eslint-plugin-next | ||
next | ||
next-bundle-analyzer | ||
next-codemod | ||
next-mdx | ||
next-plugin-google-analytics | ||
next-plugin-sentry | ||
next-plugin-storybook | ||
next-polyfill-nomodule | ||
react-dev-overlay | ||
react-refresh-utils |