rollup-plugin-css-only
rollup-plugin-css-only copied to clipboard
Nested import handling
When css is imported from modules that are being imported themselves, I'm uncertain if the order is as it should be. I'm coming from using css-loader
with webpack, which from what I have seen handles css imports the same way that javascript imports are handled (i.e. each imported modules code/imports are executed recursively before the next import statement is handled). This seems to contradict #16, however, so I'm curious what the intended functionality is for this plugin.
Code
main.js
import './a.js';
import './a.css';
a.js
import './b.css';
a.css
body {
background-color: red;
}
b.css
body {
background-color: blue;
}
Expected Behavior (What I would expect)
bundle.css
body {
background-color: blue;
}body {
background-color: red;
}
Actual Behavior
bundle.css
body {
background-color: red;
}body {
background-color: blue;
}
I'd be willing to make a PR to change this if desired
I would be happy to merge that!
Hi! I added you and @jerekshoe as collaborators, added a v4 branch and updated the README for v4. Do you see anything else that should be included in the release?