Skip to content

fix: Derive backoffice bundle cache-bust ?v= from version.json#308

Merged
rickbutterfield merged 1 commit into
v6/devfrom
v6/bugfix/manifest-cache-bust-version
Jun 30, 2026
Merged

fix: Derive backoffice bundle cache-bust ?v= from version.json#308
rickbutterfield merged 1 commit into
v6/devfrom
v6/bugfix/manifest-cache-bust-version

Conversation

@rickbutterfield

Copy link
Copy Markdown
Owner

v6 counterpart of the v5 fix (#307).

The entry point's cache-bust query was frozen at ?v=6.0.0-rc1 across releases because the vite plugin read the version from public/umbraco-package.json and the MSBuild target only fixed version, never ?v=. Browsers kept serving cached old JS after upgrading.

Now the ?v= (and the manifest version) are sourced from version.json (bumped every release). npm run build on this branch (version.json = 6.1.0-alpha) produces:

"version": "6.1.0-alpha",
"js": "/App_Plugins/Umbraco.Community.BlockPreview/index.js?v=6.1.0-alpha"

6.0.1 is already published with the stale ?v=; a follow-up 6.0.2 built with this fix is needed to bust the cache for existing installs.

🤖 Generated with Claude Code

The entry point's `?v=` query in umbraco-package.json was frozen at a stale
value (6.0.0-rc1) because the vite cacheBustImports plugin read the version from
public/umbraco-package.json and only appended ?v= when absent, while the
UpdatePackageManifestVersion MSBuild target fixed `version` but never the `?v=`.
The entry bundle URL never changed across releases, so browsers kept serving a
cached old frontend after upgrading.

Read the cache-bust token from version.json (bumped every release) and always
(re)write ?v= to it; keep the manifest version field in sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rickbutterfield rickbutterfield merged commit 3c8c47b into v6/dev Jun 30, 2026
@rickbutterfield rickbutterfield deleted the v6/bugfix/manifest-cache-bust-version branch June 30, 2026 15:41
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.

1 participant