KaiHotz / react-rollup-boilerplate

Boilerplate for creating React component libraries, bundled with Rollup.js to ESM and/or CJS Modules, Storybook, Typescript
https://kaihotz.github.io/react-rollup-boilerplate/
MIT License
300 stars 67 forks source link

Rollup how to deal with Less or css to a separate module folder #35

Closed dalongjason closed 1 year ago

dalongjason commented 1 year ago

project structure

|-components ||-components1 |||-- index.less |||-- index.js ||-components1 |||-- index.less |||-- index.js |-index.js |- index.less

output

|-components ||-components1 |||-- index.css |||-- index.js ||-components1 |||-- index.css |||-- index.js |-index.js |- index.css

KaiHotz commented 1 year ago

@dalongjason I'm sorry but i don't quite understand your question, if it is what i am thinking you might want to look into rollup.config.mjsa file and look at the options for the postcss plugin