Replies: 1 comment 2 replies
-
Currently, SWC minification (swcMinify: true) does not have a built-in way to exclude specific third-party packages from minification. Alternatively you can use Use transpilePackages in next.config.js. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I am using Next.js 14.2.23 and would like to know how to avoid a specific third-party package from the swcMinify process.
When swcMinify is enabled, variables in the same scope within the package are incorrectly overwritten by other variables with the same name, causing runtime errors. However, I still want to keep using swcMinify for the rest of my application.
Is there a way to exclude a particular package from the minification process while enabling swcMinify?
For example:
Before and after Enable swcMinify
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions