fix: allow enabling esbuild.minifyWhitespace for es format in lib mode (fix #6555)#18737
Open
WIStudent wants to merge 1 commit intovitejs:mainfrom
Open
fix: allow enabling esbuild.minifyWhitespace for es format in lib mode (fix #6555)#18737WIStudent wants to merge 1 commit intovitejs:mainfrom
WIStudent wants to merge 1 commit intovitejs:mainfrom
Conversation
fix vitejs#6555) To produce es bundles that can be tree-shaken, lib mode disables minifyWhitespace by default when using the es format. But there are cases where we want an es bundle that is as small as possible and that does not need to be tree-shakable. This change allows minifyWhitespace to be re-enabled if the user so desires.
7 tasks
|
+1 for this. We are building ES modules intended for direct consumption by the browser. Currently, we had to remove lib mode then manually reconfigure a bunch of rollup options back to using what lib mode would already provide us. Being able to minify whitespaces provides us significant savings in bandwidth across all our projects that use it. |
|
+1 for this Workaround: |
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
To produce
esbundles that can be tree-shaken, lib mode disablesminifyWhitespaceby default when using theesformat. But there are cases where we want anesbundle that is as small as possible and that does not need to be tree-shakable. This change allowsesbuild.minifyWhitespaceto be re-enabled if the user so desires.fixes #6555