rollup-plugin-css-only
rollup-plugin-css-only copied to clipboard
Release v4
Some todos that would be nice to check off before releasing v4.
- [x] Double check if README is clear
- [ ] Add more examples in README (e.g. typical
output.assetFileNamesvalues) - [ ] The default behaviour without options set, should be in line with create-react-app, css-loader, Next.js, ...
- [x] Typescript type definitions
- [ ] Add test with
output.assetFileNameswith hash - [ ] Add test with
output.assetFileNameswithout hash - [x] Consider disabling change detection to reduce complexity
- [x] Consider removing
output(styles, styleNodes)=> Let's keep it - [ ] Consider removing
output: false=> what's the usecase? - [x] Update CHANGELOG
- [ ] Update contributors
Input welcome!
Hi Thomas,
Thank you for your work on this plugin ❤️
May I ask you to consider keeping the output call back?
I am actually using it to inject the generated css into in the shadow dom node of a svelte wrapper component (by default svelte force you to build every component as webcomponents) and I guess it could become a vlid use case in the future if I have time to create a proper template that provides an app wrapper into a webcomponent.
Obviously the versioning is here to help keeping things working...
Hi! At first, I'd like to thank you for maintaining this rollup plugin, great work!
About the proposed changes for v4, I also think that output callback is pretty useful.
In our case, we are using it to clean up styles after compilation of Vue components with rollup-plugin-vue (ex. removing possible class duplications when multiple components are importing the same .scss file)
css({
async output(styles) {
const parsedStyles = await postcss([
require("cssnano")({
preset: "default"
})
]).process(styles);
fs.writeFileSync(pkg.style, parsedStyles);
}
}),
Woops I forgot to complete the checklist, tried to unpublish v4, but well... already some steps in the good direction.