Anidetrix / rollup-plugin-styles

🎨 Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more.
https://anidetrix.github.io/rollup-plugin-styles
MIT License
242 stars 43 forks source link

fix: position of named export in injected css #184

Open CxRes opened 2 years ago

CxRes commented 2 years ago

This is the fix long pending issue I had alluded in the discussion in issue #160.

CxRes commented 2 years ago

I would like to change the sourcemap inlining behaviour once this PR is accepted, but that might need a discussion. Currently, sourcemap is injected when whenever the css is injected or emited. With the css sourcemap now being passed generateBundle hook and appearing in the main js sourcemap, the inlining should only be done when user chooses to explicitly inline (and in that case not explicitly passing the map from transform hook).

CxRes commented 2 years ago

@Anidetrix I have rebased the changes on top of main. Please consider this PR again.