thgh / rollup-plugin-scss

Rollup and compile multiple .scss, .sass and .css imports
MIT License
134 stars 47 forks source link

Emit file through Rollup instead of direct write #71

Closed decahedron1 closed 1 year ago

decahedron1 commented 3 years ago

Emitting the file through Rollup's .emitFile method allows it to be picked up by other plugins, such as @rollup/plugin-html, which properly <link>s the outputted CSS.

korob93 commented 3 years ago

In my case when using rollup with grunt writeFile cannot finish its write operations before build process is finished, so I get my bundle.css file with no any content. Using writeFileSync makes it work as expected, but I believe using rollup emit is even better way of fixing it

panoply commented 3 years ago

Would be nice to see this become available.

Luke-zhang-04 commented 3 years ago

This would definitely make life easier. Maybe it should be merged into v3? v2 looks like it's being discontinued, and this might even be considered a breaking change, since the new output directory is relative to the output.dir option I believe.

thgh commented 1 year ago

Resolved in #98