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

How to minimize css when import to comoponent? #3465

Closed
tanobi92 opened this issue Dec 17, 2017 · 1 comment
Closed

How to minimize css when import to comoponent? #3465

tanobi92 opened this issue Dec 17, 2017 · 1 comment

Comments

@tanobi92
Copy link

tanobi92 commented Dec 17, 2017

I write a file css like:

body{
     color: red;
}

and I import to component, use example-with-global-stylesheet, or example-with-global-stylesheet-simple, but it not minimize the css that I write.
How to minimize css?
Thanks!

@arefaslani
Copy link

IMO best way to use global stylesheets is to put them in the static directory and link them in the _document.js as you link normal css files. Then you can install postcss-cli as a dependency and add a script to watch and process your css files. Postcss has a large set of plugins such as cssnano.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants