developit / microbundle

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

is Hashing filename supported ? #965

Closed Aadhisivam closed 2 years ago

rschristian commented 2 years ago

Hashing entry points wouldn't make much sense, as you wouldn't have stable names to add to your package.json or request from a CDN. So that's not supported.

Filenames can get a hash under certain circumstances, like dynamically importing another module. Microbundle will output that module as well, with a file name of <module>.<hash>.js. This isn't an entry point though, so you wouldn't be directly using it.

Hope this answered your question.

Edit: That being said though, Microbundle does have a programmatic API that you could use, generating your own hash to output the file as.