Next-plugins: Combining CSS, SASS and LESS configuration.

Created on 21 Feb 2018  路  3Comments  路  Source: vercel/next-plugins

There is a way to work combining more than one styles configuration?
I noticed when I try to combine two preprocesor, the last one overwrite the output file.

I want to add https://ant.design/ LESS files as a global style and manage my app styles using SASS with CSS Modules.

Can you show me an example if there is a way to do it?

Most helpful comment

@sfernandezsl, just wrap your global styles in :global{}.
Also, you can split your CSS file and make 2 files vendor.css for ant-design less files and app.css for sass project files. You can use next-compose for that

When #55 will be merged, then it gives you the possibility to split files by using include or exclude.

All 3 comments

thanks @JerryCauser it works! just one more thing...
It is possible to set up css Modules just in one of the styles configurations?
have LESS as global styles and SASS with CSS Modules?

@sfernandezsl, just wrap your global styles in :global{}.
Also, you can split your CSS file and make 2 files vendor.css for ant-design less files and app.css for sass project files. You can use next-compose for that

When #55 will be merged, then it gives you the possibility to split files by using include or exclude.

Was this page helpful?
0 / 5 - 0 ratings