Strip comments
See original GitHub issueAlthough I am using the UglifyJS plugin and have options turned on, I still get some comments in the code like /*! ... */
. I want to strip my entire output of any comment. How can I do that?
Kind regards, Ingwie.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:7
- Comments:20 (2 by maintainers)
Top Results From Across the Web
strip-comments - npm
Strip line and/or block comments from a string. Blazing fast, and works with JavaScript, Sass, CSS, Less.js, and a number of other languages....
Read more >Strip comments from a string - Rosetta Code
The task is to remove text that follow any of a set of comment markers, (in these examples either a hash or a...
Read more >strip-comments - npm Package Health Analysis - Snyk
Strip line and/or block comments from a string. Blazing fast, and works with JavaScript, Sass, CSS, Less.js, and a number of other languages....
Read more >strip-comments examples - CodeSandbox
Strip Comments Examples. Learn how to use strip-comments by viewing and forking example apps that make use of strip-comments on CodeSandbox.
Read more >Remove comments from string with JavaScript using JavaScript
How can I remove all comments from 's' string? Should I use some Regexp for it? I don't know. javascript.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I get them stripped now. This is my config for Uglifyjs. The only place where comments are left, is CSS.
Notice the function there - that does the trick. It only leaves comments with
@copyright
in. All others are goners.