Do you want to request a feature or report a bug?
Bug
What is the current behaviour?
I get stable hashes for my bundle.js across multiple builds with modified files.
If the current behaviour is a bug, please provide the steps to reproduce.
Create a new project via preact-cli (default template) build it, add something in app.js and rebuild it.
Both artifact versions (bundle.js) get the same hash which breaks distributing via CDN.
What is the expected behaviour?
The second run should generate a different hash. I don鈥檛 tried the same thing with the style.css bundle. Maybe it鈥檚 the same thing.
Please mention other relevant information.
P.S.: besides this I鈥檓 in love with this cli. Everything works OOTB or can be added via plugin or a small configuration. Great work!
@otbe what command/flags are you using to build the app?
Only the default ones. A simple preact build (or npm run build) leads to this error.
preact-cli version?
2.1.0 (installed today :))
There is a test repo: https://github.com/otbe/preact-cli-test
$ npm i
$ npm run build
Note the hash from bundle.[hash].js; go to app.js and add something after foo
$ npm run build
On my machine I get the same hashes for both builds. :/
checking now
wow this actually is a bug. how is this never caught before is amazing!
or may be i out of touch and missing something super obvious
Found the culprit: https://github.com/alexindigo/webpack-chunk-hash/issues/15
Thanks for pointing this our @otbe! Looks like it was affecting my builds too. 馃憥 For auto-resolving semver dependencies, haha.
I'll try to send in a fix now.
Thanks for the fast fix! Works for me 馃憤
Most helpful comment
Thanks for pointing this our @otbe! Looks like it was affecting my builds too. 馃憥 For auto-resolving semver dependencies, haha.
I'll try to send in a fix now.