Skip to content
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

Possibility of stripping the hash in filenames on buildEnd or the likes? #2050

Closed
23d1 opened this issue Sep 24, 2018 · 6 comments
Closed

Possibility of stripping the hash in filenames on buildEnd or the likes? #2050

23d1 opened this issue Sep 24, 2018 · 6 comments

Comments

@23d1
Copy link

23d1 commented Sep 24, 2018

❔ Question

Is it possible to remove hashes on buildEnd, and if so, how would one go about it?
Is adding "buildEnd": "unix command to strip characters between periods and a period" (any help here much appreciated) to the "scripts": {} section sufficient? Can't seem to get it to work...

🔦 Context

For projects where it is not feasible updating html/twig-files across a range of folders above the JS/SCSS portion of the project. Very tedious to go in and replace hashes in the files after bulding (it's fine when watching, as the hashes don't change).

🌍 Your Environment

Software Version(s)
Parcel 1.9.7
Node 10.11.0
npm/Yarn 6.4.1
Operating System macOS 10.13.6
@Hoishin
Copy link

Hoishin commented Sep 24, 2018

If "disable content hash" is what you want, there is this PR #1934

@23d1
Copy link
Author

23d1 commented Sep 24, 2018

Hmm.

error: unknown option `--no-content-hash'

Even with 1.10.0-beta.1... Probably a user error on my part...

@Hoishin
Copy link

Hoishin commented Sep 24, 2018 via email

@23d1
Copy link
Author

23d1 commented Sep 25, 2018

Gotcha. So if I was instead to go the API route, where would I drop that js-file? I can't seem to find that info in the docs. I basically want to access this option, referenced here; contentHash: false

@Hoishin
Copy link

Hoishin commented Sep 25, 2018

If you use the API like the docs you referenced, just run the JavaScript file with node.

@23d1
Copy link
Author

23d1 commented Sep 25, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants