I double checked and you’re right, bundle hash names change when needed. Unfortunatly it is not enough to ensure that the browser reload correctly the app, it seems that users also need to restart the browser (or kill and reload the app on mobile) in order to load and run a new version. if they don’t, they might stay with an outdated cache for a while.
Posts made by wannabefree
-
RE: how to add [contenthash] to the file names at build ? [solved]
-
RE: how to add [contenthash] to the file names at build ? [solved]
I added the option webpackManifest as below to quasar.conf.js which seems to do what i was looking ie the build bundle names change when the source is updated. I’ll verify if this does solve the cache issue i was trying to manage and let you know.
The docs for this option states “Improves caching strategy. Use a webpack manifest (runtime) file to avoid cache bust on vendor chunk changing hash on each build.” which is not entirely clear to me.
build: {
webpackManifest: true
} -
RE: how to add [contenthash] to the file names at build ? [solved]
Hi, Scott, yes, but but this default hash has the same for value build after buid. What i’m looking for is a sort of checksum hash that would change each time the underlying source files have changed.
-
how to add [contenthash] to the file names at build ? [solved]
Hi,
The default Quasar build process creates the /dist files with the same names on every run.When redeploying a small pwa app for testers, I noticed this was a problem because previous .js and .css files were cached.
When digging in the docs, I found out Webpack provides a [contenthash] variable to add to file names to ensure that distributed files have a new name as soon as they have changed.
Unfortunatly, I’m newbie and this is my first Quasar app, so I have no idea how to setup quasar.conf.js to enable this webpack feature.
Any help will be appreciated