egoist / rollup-plugin-postcss

Seamless integration between Rollup and PostCSS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you configure for a combination of CSS-in-JS and separately a global css file

mickeypuri opened this issue · comments

For most components in our component library we are going to go with CSS-in-JS and import into the component from .scss files for each component.
Unfortunately one component uses a 3rd party Carousel which provides its own .scss files. This won't work with injected css. So for this component we need to create a global css file from the .scss files that the 3rd party provides.

Reading the docs suggests that you can either do CSS-in-JS or else create a single external css file.

Is it possible to configure rollup-plugin-postcss to produce the CSS-in-JS and import them into our components, and separately prepare a global css file from a couple of .scss files?

What would this config look like?

I have found a way to do this