Search code examples
ember-clibroccolijs

Ember-CLI / Broccoli - How can I remove all comments from source files when building?


As in the title - how would one go about removing comments from both JS and CSS files when being compiled though Broccoli.

I am using Broccoli as part of Ember-CLI.


Solution

  • When you build your project you have to set the environment to production, it defaults to development.

    ember build --environment production will concat, minify and uglify your scripts and css removing all comments.

    For more info refer to this part of the docs.