-
Notifications
You must be signed in to change notification settings - Fork 166
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
[RFC] Change bundle names to include content hashes #1037
Comments
Hey, can I take this issue up? |
Yes -- please do! |
Hmm. Have not seen this particular error. To develop auspice I suggest installing from source via https://nextstrain.github.io/auspice/introduction/install#installing-from-source (apologies if you're doing this, |
Thanks, that worked. |
Hey @HashTalmiz -- I believe that the main bundle ( |
This adds a bundlesize check to the CI with very liberal tolerances for most of the chunks. It should identify egregious bundle size expansion and provide an easier path for manual comparison of master vs PRs. Currently bundlesize doesn't work with GitHub actions out-of-the-box, but this is planned for their roadmap (and they've just got $10k from Google so I'm confident it will happen). Redux-saga seems to have this working via https://github.com/redux-saga/redux-saga/pull/1952/files. We can revisit the settings here after the chunk hashing #1037.
This adds a bundlesize check to the CI with very liberal tolerances for most of the chunks. It should identify egregious bundle size expansion and provide an easier path for manual comparison of master vs PRs. Currently bundlesize doesn't work with GitHub actions out-of-the-box, but this is planned for their roadmap (and they've just got $10k from Google so I'm confident it will happen). Redux-saga seems to have this working via https://github.com/redux-saga/redux-saga/pull/1952/files. We can revisit the settings here after the chunk hashing #1037.
CI/CD tests failed in the above mentioned PR :/ , This is my first PR on github so kindly excuse the mistakes |
No problem -- I'll take a look over the coming days! |
Thanks. Let me know what was wrong. |
Removed other html page references as per the comment made here ->(nextstrain#1037 (comment))
Removed other html page references as per the comment made here ->(nextstrain#1037 (comment))
Context
Currently, the bundle & chunk names used across builds are the same. This can cause caching issues on the client side where browsers may serve outdated versions of the bundle. It may also cause version mismatches across chunks where a mixture of up to date and out of date chunks are executed. A common cache busting technique/practice is to include a unique hash in the file name calculated for each chunk during the build. A change in code will cause the hash to be different, thereby the file name to be different and in turn bypass the browser cache
Resulting files names would look like,
Relevant Reading
https://webpack.js.org/guides/caching/#output-filenames
Possible Solution
Add
[contenthash]
to output.filename and output.chunkFilename in the webpack config.The text was updated successfully, but these errors were encountered: