parcel build --no-content-hash <file>.html
does nothing, just builds and hashes the files as usual.
It does work for .js files, but not .html files referencing js/scss etc...
parcel build --no-content-hash index.html
or
parcel build index.html --no-content-hash
still hashes the filenames.
Unless I'm way off, and this literally only applies to content within the files not being hashed鈥攊t should indeed build without hashes in the filenames... Right?
Hashes the output files...
?
Would be an awesome feature for cases where the parcel part of a big php/twig project isn't feasible to potentially update hashed filenames across hundreds of files.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.10.0
| Node | 8.12.0
| npm/Yarn | 6.4.1/1.9.4
| Operating System | macOS 10.13.6
Hashes will still be added to the files, but not content hashes. i.e. the hashes will not change every build based on the content. Instead, the hashes are based on the filename.
We cannot completely remove the hashes because the output directory structure is flattened. If we removed the hashes, there might be conflicting output file names.
Gotcha, thanks! Wouldn't mind that feature, though. I suppose one could cook something up with buildend
somehow...
@devongovett Is it possible to retain original directory structure and filenames, without flattening and any hashes in filenames?
There were already issue #433 with PR #557, but they were both closed without support for that. Is there any chance this can be implemented now (maybe with some --preserve-directory-structure
flag)?
Most helpful comment
Hashes will still be added to the files, but not content hashes. i.e. the hashes will not change every build based on the content. Instead, the hashes are based on the filename.
We cannot completely remove the hashes because the output directory structure is flattened. If we removed the hashes, there might be conflicting output file names.