Disable filenameHashing, but add hash as query parameter in index.html
See original GitHub issueWhat problem does this feature solve?
Hi,
I want to disable filenameHashing
, but instead want to add the hash as query param to the injected resources in index.html, like <script src="/js/chunk-vendors.js?_hash=0d01e0b2c53c417bdcfd"></script>
. Thus, the resources loaded via index.html will still be fetched if changed even if they got a long cache expiry. Is this possible somehow?
Thanks!
What does the proposed API look like?
<script src="/js/chunk-vendors.js?_hash=0d01e0b2c53c417bdcfd"></script>
or
<script src="/js/chunk-vendors.js?_version=0d01e0b2c53c417bdcfd"></script>
maybe via a setting in vue.config.js like addFilenameHashAsQueryParam
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
vue.js - Is there a way to disable filenameHashing only for ...
Yes, there is a way. You will need to override the 'images' rule that vue-cli comes with. vue inspect --rule images yields the...
Read more >Adding Hashes to Filenames - SurviveJS
Starting from version 5, webpack is using a deterministic way of generating filenames that's a good compromise between bundle size and long time...
Read more >Configuration Reference | Vue CLI
If you cannot make use of the index HTML generated by Vue CLI, you can disable filename hashing by setting this option to...
Read more >Caching - webpack
The [contenthash] substitution will add a unique hash based on the content of an ... so we don't have to deal with maintaining...
Read more >AngularJS: How to clear query parameters in the URL?
path() + $location.hash()).replace(), but it keep the query params in the URL. I am also unable to extract the query parameters ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can overwrite the webpack config
Update: Strongly recommend use
css
config in vue.config.jsvue.config.js
@fangbinwei @herrernst With the solution above, app-legacy.js isn’t generated. Here’s my solution: