-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
SvelteKit: when using with node-adapter, build and preview cause layout shift #437
Comments
@xmlking what build are you using? All pages generated without any script, and cannot register sw (build + preview)... |
in
|
I created this minimal repo to reproduce the issue https://github.com/xmlking/SPA-aaa-sveltekit-node-vite-pwa-issue Steps to reproduce
Server side errors
Now disable SvelteKitPWA adding
|
for routers in root |
Hi @xmlking, did you end up finding a solution for this? I'm having the same issue using the SvelteKit plugin. Also mentioned here: vite-pwa/sveltekit#24. Edit: Seems to be fixed by setting |
After the build, when we run preview i.e.,
pnpm preview
:which activates service worker, script URLs change from full URL
http://localhost:4173/auth/_app/immutable/assets/_layout-e564fd4d.css" to relative
./_app/immutable/assets/_layout-e564fd4d.css`This causes the URL fetch to fail as the asset base path is wrong.
To Reproduce : https://github.com/xmlking/svelte-starter-kit
Before SW activation
After SW activation
Error in console
The text was updated successfully, but these errors were encountered: