Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generateSW disables default error page #44

Open
jasoneliu opened this issue Apr 18, 2023 · 0 comments
Open

generateSW disables default error page #44

jasoneliu opened this issue Apr 18, 2023 · 0 comments

Comments

@jasoneliu
Copy link

jasoneliu commented Apr 18, 2023

In production, when using export const prerender = true and generateSW, SvelteKit's default error page no longer works. Instead, the user is shown the page at /.

Reproduction:

  • In examples/sveltekit-ts, update package.json to use "@vite-pwa/sveltekit": "^0.2.1"
  • Run npm i, npm run build, and npm run preview
  • Visit http://localhost:4173/. This shows +page.svelte as expected.
  • Visit http://localhost:4173/about. This shows about/+page.svelte as expected.
  • Visit http://localhost:4173/oops. This shows +page.svelte instead of rendering the default error page.

This issue does not occur in development. When running npm run dev and visiting http://localhost:5173/oops, it shows the default error page.

I'm using Node v16.19.0 and npm v8.19.3.

@jasoneliu jasoneliu changed the title Prerender disables default error page generateSW disables default error page May 16, 2023
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

No branches or pull requests

1 participant