rollup-plugin-css-only icon indicating copy to clipboard operation
rollup-plugin-css-only copied to clipboard

Release v4

Open thgh opened this issue 4 years ago • 3 comments

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.assetFileNames values)
  • [ ] 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.assetFileNames with hash
  • [ ] Add test with output.assetFileNames without 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!

thgh avatar Feb 03 '21 14:02 thgh

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...

stefanovualto avatar Feb 04 '21 18:02 stefanovualto

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);
  }
}),

przemkow avatar Feb 04 '21 22:02 przemkow

Woops I forgot to complete the checklist, tried to unpublish v4, but well... already some steps in the good direction.

thgh avatar Oct 19 '22 23:10 thgh