vendredi 9 novembre 2018

How do I minify CSS classnames with Ember CLI?

I looked through the docs on how to do this but nothing turned up.

There's this:

The compiled css-files are minified by broccoli-clean-css or broccoli-csso, if it is installed locally

So I'm guessing it uses broccoli-clean-css by default which uses clean-css. I looked at both clean-css and csso and neither seem to have an option for mangling/minifying class names.

So I looked at how the React / Webpack folks are doing it. They seem to use css-loader which relies on post-css.

As far as I can tell, Ember doesn't use PostCSS out of the box?

Question: how can I get Ember CLI to mangle class names and remove useless classes/IDs like .ember-view and #ember123?

My motivation for this is I want to cache SSR content in Redis but my Redis instance is filling up so I need smaller payloads.




Aucun commentaire:

Enregistrer un commentaire