linaria icon indicating copy to clipboard operation
linaria copied to clipboard

rollup: option to keep generated css imports

Open jackmellis opened this issue 4 years ago • 4 comments

The current behaviour of the rollup plugin is to extract styles to a css file and then remove it from the js. This means the consumer has to manually import the js and css separately.

Sometimes (especially when writing internal packages) it's preferable to have the package manage its own css imports, so it'd be great if there was the option to leave the css imports in.

We have forked and implemented this behaviour internally so it's definitely possible.

jackmellis avatar Nov 22 '20 10:11 jackmellis

Hi @jackmellis

Since you have it implemented, maybe you can try to make a PR?

Anber avatar Nov 23 '20 11:11 Anber

Hi @Anber is there an easy way to test the linaria suite locally? I don't think it's as simple as yarn link (having branched from master)

jackmellis avatar Nov 27 '20 18:11 jackmellis

Hi @jackmellis

yarn link works well for me.

Anber avatar Nov 27 '20 19:11 Anber

@jackmellis Where you able to make a PR for this? Could you point me towards how you prevented rollup from removing the imports?

Bohdan-Anderson-Rangle avatar Aug 10 '23 01:08 Bohdan-Anderson-Rangle