developit / microbundle

📦 Zero-configuration bundler for tiny modules.
https://npm.im/microbundle
MIT License
8k stars 361 forks source link

a possible way to set the name of the bundled css file in dist folder #1018

Open Mood-al opened 1 year ago

Mood-al commented 1 year ago

Hey, i want to change the name of the css file that got bundled in dist folder from index.css to any name i want. like here in this image i want to change the name of the bundled css file to rts.css. can I do this? Screenshot 2023-01-14 at 02 11 18

rschristian commented 1 year ago

The name matches your output JS, I believe. If you want to name it something else you'll need to use a post-build script:

"build": "microbundle ... && mv dist/index.css dist/rts.css"