[PR #2562] [MERGED] fix: derive workbox version from package.json at build time #10081

Closed
opened 2026-04-23 09:23:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2562
Author: @tink-bot
Created: 4/8/2026
Status: Merged
Merged: 4/8/2026
Merged by: @kolaente

Base: mainHead: fix-workbox-version


📝 Commits (1)

  • bc07028 fix: derive workbox version from package.json at build time

📊 Changes

2 files changed (+9 additions, -1 deletions)

View changed files

📝 frontend/src/sw.ts (+2 -1)
📝 frontend/vite.config.ts (+7 -0)

📄 Description

The service worker hardcoded workbox version v7.3.0, which fell out of sync with the actually installed workbox v7.4.0, causing 404s for workbox runtime files.

This reads the version from workbox-precaching/package.json at build time via Vite's define option, so the service worker always references the correct version.

Fixes #2549


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2562 **Author:** [@tink-bot](https://github.com/tink-bot) **Created:** 4/8/2026 **Status:** ✅ Merged **Merged:** 4/8/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix-workbox-version` --- ### 📝 Commits (1) - [`bc07028`](https://github.com/go-vikunja/vikunja/commit/bc07028f646a337d5e348d1276115c2ed132b17d) fix: derive workbox version from package.json at build time ### 📊 Changes **2 files changed** (+9 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/sw.ts` (+2 -1) 📝 `frontend/vite.config.ts` (+7 -0) </details> ### 📄 Description The service worker hardcoded workbox version `v7.3.0`, which fell out of sync with the actually installed workbox `v7.4.0`, causing 404s for workbox runtime files. This reads the version from `workbox-precaching/package.json` at build time via Vite's `define` option, so the service worker always references the correct version. Fixes #2549 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 09:23:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#10081