Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add `entryFileNames` with `bust` infix to fix CacheBuster issue to `vite.config.mjs` example
  • Loading branch information
hlubek authored Sep 18, 2024
1 parent 804f93e commit 0c8394c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export default defineConfig((configEnv) => ({
header: "Resources/Private/Javascript/header.js",
},
output: {
// The Flowpack.CacheBuster package adds a `?bust` get parameter with a hash based on the file content.
// This leads to issues with files imported from the manifest, as they may be loaded twice.
// (Once with the bust parameter and once without, as they are technically two different URLs.)
// To work around this we add a "bust" infix so CacheBuster skips adding the bust parameter.
entryFileNames: "assets/[name]-bust-[hash].js",
// If you use this output option the Fusion object will just work™️
dir: "Resources/Public/Dist",
},
Expand Down

0 comments on commit 0c8394c

Please sign in to comment.