Conversation
There was a problem hiding this comment.
Why do we commit this file ?
vite-plugin-pwa 1.2.0 is published on npm.
There was a problem hiding this comment.
The npm package vite-plugin-pwa@1.2.0 still declares Vite support only up to ^7, so installing it with vite@8 fails with ERESOLVE.
vendor/vite-plugin-pwa-1.2.0.tgz is a patch version used as a workarround.
But I found a mutch better soluton for this: vite-pwa/vite-plugin-pwa#918
| }, | ||
| }), | ||
| VitePWA({ | ||
| injectRegister: "script", |
There was a problem hiding this comment.
We do not need this, it works without it.
|
I had to erase packages.lock and reinstall, otherwise the app crashed on startup |
| "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", | ||
| "dev": true, | ||
| "node_modules/rolldown": { | ||
| "version": "1.0.0-rc.12", |
There was a problem hiding this comment.
I'm a bit uncomfortable relying on a core dep that isn't stable yet
|
rolldown v1 has been released. Can you update the PR? Also, needs rebase. |
Waiting for rolldown to be more stable
The migration is working technically: the project installs, typechecks, and builds successfully.
That said, there are still ecosystem compatibility gaps around Vite 8, so this PR is worth reviewing carefully before merge.
What was updated
viteto v8@vitejs/plugin-reactvitestand related browser packagesstorybook/@storybook/react-vite.storybook/main.tsfor ESM executionValidation
I verified that these commands pass:
npm ci --ignore-scriptsnpm run typechecknpm run buildnpm run build:demonpm run build-storybookI also verified the PWA flow still works:
dist/registerSW.jsdist/sw.jsdist/workbox-*.jsdist/index.htmlstill includes:registerSW.jssw.jsandworkbox-*.jsare requestedKnown issues
vite-plugin-pwavite-plugin-pwa@1.2.0still declares Vite support only up to^7.This PR uses an
overridesentry so npm resolvesvite-plugin-pwaagainst the project's Vite 8 version.Storybook transitive dependency
@storybook/react-vitestill pulls in@joshwooding/vite-plugin-react-docgen-typescriptthrough a dependency range that does not resolve to the Vite 8-compatible version by default.This PR uses an
overridesentry inpackage.jsonso that the resolved version is compatible with Vite 8.Explicit Workbox packages
This PR keeps explicit
workbox-buildandworkbox-windowdependencies becausevite-plugin-pwarequires them at build time in this setup.