Skip to content

Commit

Permalink
feat: allow configure falsy navigate fallback (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Nov 13, 2023
1 parent b380d0d commit db6b669
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@vite-pwa/astro",
"type": "module",
"version": "0.1.4",
"packageManager": "pnpm@8.9.2",
"packageManager": "pnpm@8.10.3",
"description": "Zero-config PWA for Astro",
"author": "antfu <anthonyfu117@hotmail.com>",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ function getViteConfiguration(
injectRegister,
}

if (!useWorkbox.navigateFallback)
// the user may want to disable offline support
if (!('navigateFallback' in useWorkbox))
useWorkbox.navigateFallback = config.base ?? config.vite?.base ?? '/'

if (directoryFormat)
Expand Down

0 comments on commit db6b669

Please sign in to comment.