rtsao / csjs

:sparkles: Modular, scoped CSS with ES6
MIT License
576 stars 32 forks source link

Is there any way to compress string literals? #60

Closed drcmda closed 7 years ago

drcmda commented 7 years ago

This project has been perfect so far, i can't believe it solves pretty much all the major issues with React and styles.

The only gripe left is that the minified endbuild has lots of needless holes in it taking space due to the string literals. And since postCSS/cssnano doesn't work with babel-plugin-csjs-postcss there's no obvious solution.

Is there any alternative to compress it?

scott113341 commented 7 years ago

Hi @drcmda, I stumbled across your post on Reddit today. Thanks for taking the time to figure this out! I will make a PR to add this to the docs.

For quick reference, @drcmda is using the csswring PostCSS plugin.

rtsao commented 7 years ago

I didn't know about csswring, that's great!