-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat!: add SvelteKit 2 support #76
Conversation
package.json
Outdated
@@ -50,8 +50,8 @@ | |||
"test": "pnpm run -C examples/sveltekit-ts test" | |||
}, | |||
"peerDependencies": { | |||
"@sveltejs/kit": "^1.3.1", | |||
"vite-plugin-pwa": ">=0.16.7 <1" | |||
"@sveltejs/kit": "^1.3.1 || ^2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sveltekit 2 requires vite5, sveltekit 1 requires vite4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a dev dependency, Vite 4 and Vite 5 don't change plugin types, it should be compatible with Rollup 3 and 4.
I've tested this PR also with kit 1 and tests green:
- extract example from main branch to a new folder
- remove
@vite-pwa/sveltekit
from dev dependencies (using workspace protocol) - add vite 4.5.1, vite-plugin-pwa, workbox-window, workbox-precaching and workbox-routing as dev dependencies
pnpm build && pnpm pack
in this PR, copy tgz to the new project folder- install the plugin using file protocol:
pnpm add -D ./vite-pwa-sveltekit-0.2.10.tgz
- tests green:
pnpm test
Navigation seems to be broken when changing the url, for example (even with
Previous test with Maybe we need a breaking change and update the logic, we should include trailing and no trailing variant per route (html page). I'll try to run the migration... |
SvelteKit 2.0.1 fixes trailing slash: added Playwright offline + trailing slash test |
No description provided.