-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Anyhow to remove "comments" in minified js? #87
Comments
This is by design on esbuild's end:
Can you open an issue here? I think minification-benchmarks can also benefit from a more nuanced control over removing comments as other minifiers support it. |
Thanks for the reference 👍 Edit: |
I would still open a feature request about having granular control over whether license comments should be kept. Some authors might be referencing licenses in a separate file instead of the JS code. Since esbuild preserves As an example, you can use code-inject-loader to accomplish this:
Note that this is risky because it doesn't guarantee that |
Re-opening as esbuild v0.11.15 has an option to remove comments. |
Using
ESBuildMinifyPlugin
, is there anyway to remove the comments in the minified js file?For example:
![image](https://user-images.githubusercontent.com/13672022/103356619-d9615b80-4ae3-11eb-86c0-0582ee2f1068.png)
If using terser, we can add easily using
comments: false
in the output options.The text was updated successfully, but these errors were encountered: