You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by vjhebbar January 21, 2024
Hello,
Since I updated to webpack 5.79+ in my project, bundle sizes have increased because some exported object names are not minified.
It turns out that this is due to those objects being destructured in modules where they are imported.
Refactoring the code to remove the object destructuring minimizes the name again.
Prior to 5.79, the names were minified regardless of the use of destructuring.
The root cause is that canMangle is set to false in lib/dependencies/HarmonyImportDependencyParserPlugin.js.
Should this flag be set according to the mangleExports optimization value?
Discussed in #17988
Originally posted by vjhebbar January 21, 2024
Hello,
Since I updated to webpack 5.79+ in my project, bundle sizes have increased because some exported object names are not minified.
It turns out that this is due to those objects being destructured in modules where they are imported.
Refactoring the code to remove the object destructuring minimizes the name again.
Prior to 5.79, the names were minified regardless of the use of destructuring.
Is this behavior aligned with #16941?
If this is not expected behavior, I'll share my configs and minimum reproducible code.
Looking forward to your thoughts and suggestions.
The latest version where the issue is reproducible is 5.90.
The text was updated successfully, but these errors were encountered: