Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js@13.5 fix - Changed default number of passes of the Webpack TerserPlugin from 2 to 1 #504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

camcamcamcam
Copy link

Changed the number of passes by the TerserPlugin from the default of 2 to just 1, which does add a few bytes to the output, but fixes the incompatibility with the new SWC minifier that is now default in Next.js.

https://webpack.js.org/configuration/optimization/#optimizationminimizer

Required updating Webpack to a version above 5.87.0, when the ability to do this was added. Doing this created linting errors until every other package was also updated.

After building my app with this updated package, everything seemed to work correctly again.

Changed the number of passes by the TerserPlugin from 2 to 1, which adds a few bytes to the output, but fixes the incompatibility with the new SWC minifier that is now default in Next.js.

Required updating Webpack to a version above 5.87.0, when the ability to do this was added.

Doing this created linting errors until every other package was also updated.
@timomedia
Copy link

If it really works, please fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants