-
Notifications
You must be signed in to change notification settings - Fork 2
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
build: assetfiles-without-hash #1760
Conversation
Visit the preview URL for this PR (updated for commit d15bffc): https://emeris-app--pr1760-build-assetfiles-wit-8sj8dt1y.web.app (expires Tue, 14 Jun 2022 12:10:56 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM until Sentry error logs are tidied up.
Long thread here https://allinbits.slack.com/archives/C02TBMVAJDN/p1652087614472409
The hashes are important for the user to have the latest changes: https://stackoverflow.com/questions/59194365/webpack-4-hash-and-contenthash-and-chunkhash-when-to-use-which, otherwise the user will always see an old version if we have cache in place, and I think is a huge problem for us |
would this create a temporary solution? @Dawntraoz would this solve your concern? This way we could still have the import resolve well, and also update it with the new hash |
Of course, but guessing that the version should be one for build and not one for file (as it was wtih the chunkHash). |
Caution:
I assume this hash is implemented to ensure a new file is loaded. It's important to check if caching is handled correctly with this fix. It might lead to new problems with caching, and needing hard refreshes and things like that.
Problem:
The current build is causing this error:
It is because we are loading https://app.emeris.com/assets/Asset.4782f5bd.js
which has this hash
4782f5bd
inside the urlSolution:
As described in vitejs/vite#378
There is an easy way to remove this hash by adding:
which cleans up the hash from the files, and you can see my dist folder, with a clean
Asset.js
:This means it won't fail to dynamically import these modules anymore.