-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--no-content-hash
isn't working correctly
#5894
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
--no-content-hash
isn't working correclty--no-content-hash
isn't working correctly
Excellent thanks for the clarification |
The help docs say it shouldn't include hashes.
|
No, as I've said, it "disables content hashing". It doesn't "disable hashing". But I admit that the docs should make this clearer |
I don't see the value of having a static hash if it doesn't match the content. Why isn't it completely disabled? |
See #2056 |
Appears to be working in the latest nightly. |
Even though I use > rm -r dist || rm -r .parcel-cache || true && parcel build --no-content-hash src/index.html`
✨ Built in 15.71s
dist/index.html 1.33 KB 17.54s
dist/logo.4f32dfb3.svg 355 B 17.53s
dist/app.webmanifest 450 B 2.09s
dist/appIcon512.7666cacc.png 6.09 KB 17.29s
dist/index.178894d8.css 4.15 KB 2.32s
dist/index.c2dc1f85.js 855.98 KB 13.90s
> rm -r dist || rm -r .parcel-cache || true && parcel build --no-content-hash --no-source-maps src/index.html
✨ Built in 20.37s
dist/index.html 1.33 KB 13.59s
dist/logo.fde9f7fd.svg 355 B 13.58s
dist/app.webmanifest 450 B 837ms
dist/appIcon512.6a4fe200.png 6.09 KB 13.27s
dist/index.0c63f772.css 4.1 KB 1.13s
dist/index.62ba04f6.js 855.92 KB 13.31s Is there a way to not have hashes in the filename please? It's confusing when trying to learn service workers and caching. |
The hash will still be dependent on some build options. It's just that "build", "change file", "build" won't change the hash. |
Ok, so how do I refer to these files correctly in my PWA's service worker if I don't want to have them go missing if I change something in my build please? |
You can do |
Ok, the hashes are definitely not the same. I haven't changed any of my build commands and you can see here the filenames I cached are not the ones the dev server is supplying: Secondly, the service workers documentation for Parcel is almost nonexistent - https://parceljs.org/languages/javascript/#service-workers. How are filenames managed and added? The sample just imports something called manifest, but how does it get the filenames? |
You can use this plugin to fully remove content hashes from your output - https://www.npmjs.com/package/parcel-namer-hashless |
Ok, no, that plugin doesn't work, Parcel gives the error |
A parcel plugin automatically injects a manifest. |
+1 I don't want hash, why Parcel forces it? |
🐛 bug report
--no-content-hash
doesn't seem to have an effect.😯 Current Behavior
When changing the contents of an JS asset, the bundle hash changes.
🤔 Expected Behavior
Bundle name hash shouldn't change
💻 Code Sample
parcel build index.html --no-content-hash
🌍 Your Environment
The text was updated successfully, but these errors were encountered: