Skip to content
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

Remove comments from javascript files in production environment #141

Closed

Conversation

Seikyo
Copy link

@Seikyo Seikyo commented Aug 17, 2017

This PR removes comments from compiled javascript files in production

Please let me know if this was intended to be the default behaviour I will work on implementing a method to allow default options to be overridden

@Lyrkan
Copy link
Collaborator

Lyrkan commented Aug 17, 2017

Hi @Seikyo,

Isn't that the default value for UglifyJS (cf. https://github.com/mishoo/UglifyJS2#output-options)?

There is another open issue (#15) kind of related to how comments are handled during minification. From what I read in it the only comments left should be the ones containing @licence or @preserve, which is an intended behavior.

@Seikyo
Copy link
Author

Seikyo commented Aug 17, 2017

Hi @Lyrkan

After some research here is the default value for uglifyJS comments : /^\**!|@preserve|@license/

I think you can cancel this PR as it is indeed the expected behaviour. It would be a better idea to allow overriding uglifyJsPlugin as suggested in #15 and will resolve my issue.

For information, with the options comments: false all comments are properly removed.

Edit : Closing the pull request myself

@Seikyo Seikyo closed this Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants