Closed nelsliu9121 closed 3 years ago
I analyzed the issue, the lib does the test nextConfig.config.future && nextConfig.config.future.webpack5
to enable the Webpack 5 config. In Next.js 11+, the flag to explicitly disable Webpack 5 has been moved as a top level property on the Next.js configuration, and if not specified WP5 is enabled by default.
Next.js 11 announced recently and it is making webpack 5 the default bundler. The
future.webpack5
config innext.config.js
has been moved towebpack5
and it is set totrue
by default. (see this)To reproduce, go to this CodeSandbox
This is the error printed when running
npm run dev
: