❔ Question
Hello!
I’ve searched all along but I don’t see anything that really answer the question (or the problem).
I want to take benefit of the --no-content-hash
but the console say unknown option
–no-content-hash’` and I tried with the ‘build’ command and it make the (nearly) same output, files are still hashed.
I use the plugin parcel-plugin-asset-copier
Here are my full commands:
Dev: "dev:local": "cross-env parcel html/index-dev.html --no-autoinstall --port 8081 -d dist/dev/ --cert ssl/localhost.crt --key ssl/localhost.key",
Prod: "build": "cross-env parcel build --no-content-hash html/index-dev.html -d dist/prod/"
So far so good (without the –no-content-hash) but the problem is that every single assets used by html/css is hashed and throw in the dev/ folder, while I also have every assets in my /assets/ sub repos.
So I have fonts, icons, etc.
And also got them in /assets/.
Maybe that something we will be able to do in Parcel 2? (I’m on LTS projects only..)
🔦 Context
I would like that parcel do not modify resources that way I can keep them in the folder.
It’s not “clean” that way and we have several builds on the server using the same resources.
Also, each templates (and JS) are using images, so I can’t just “delete” my assets folders, as it is now, parcel put some images in the dist/, and I have duplicates in assets/ and both are used…
🌍 Your Environment
Last parcel 1.12.4
parcel plugin asset copier: 1.0.0
You can solve this with a custom namer plugin: https://v2.parceljs.org/plugin-system/namer#content. This gives you complete control over the file naming of all bundles produced by parcel.