Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ export default defineConfig(({ mode }) => {
VitePWA({
disable: !featurePwa,
registerType: "autoUpdate",
// Remove the trailing slash so we can serve from e.g. /v/3 not just /v/3/
// This requires the corresponding service-worker-allowed header to be set.
// URLs are prefix matched so it's a compromise solution that could affect other
// paths sharing the same prefix
scope: process.env.BASE_URL?.replace(/\/$/, ""),
workbox: {
cacheId: pwaCacheId,
// Only precache language assets for the fallback language.
Expand Down