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

Add hash-based cache busting for client side bundles #377

Merged
merged 12 commits into from
Jul 12, 2024

Conversation

Thomas-Geraghty
Copy link
Contributor

  • Added esbuild-plugin-manifest module for generating a manifest file that maps original asset name to its generated output, structured like below
{
  "/assets/js/app.js": "/assets/js/app.UG7VY7MS.js",
  "/assets/css/app.css": "/assets/css/app.47MYFHW7.css"
}
  • Added logic to read manifest file and use mappings through a nunjucks filter called assetMap to swap asset strings for the build output
  • Removed old cache busting code

@Thomas-Geraghty Thomas-Geraghty marked this pull request as ready for review June 30, 2024 13:20
@Thomas-Geraghty Thomas-Geraghty marked this pull request as draft June 30, 2024 13:20
esbuild/assets.config.js Outdated Show resolved Hide resolved
@Thomas-Geraghty Thomas-Geraghty marked this pull request as ready for review July 11, 2024 11:30
Copy link
Contributor

@psoleckimoj psoleckimoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@andrewrlee andrewrlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

None yet

4 participants