LF-5206: Upgrade to Vite v5#4171
Conversation
- Bump vite, vitest, vite-plugin-svgr, vite-plugin-pwa, vite-plugin-istanbul
- Migrate SVG imports from { ReactComponent as X } to default ?react query (vite-plugin-svgr v4 breaking change)
- Set moduleResolution to Bundler in tsconfig files (Rollup 4 requirement)
- Fix @storybook/react/* wildcard imports exposed by stricter moduleResolution
- Fix missing key props in HarvestUseType and TransplantSpotlight (pre-existing, exposed by lint-staged)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces silenceDeprecations: ['legacy-js-api'] with api: 'modern-compiler', now that Vite 5.4+ is in use. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Description
Upgrade Vite to v5. (Most changes relate to SVG imports)
Migration guide: https://v5.vite.dev/guide/migration
vite,vitest,vite-plugin-svgr,vite-plugin-pwa, andvite-plugin-istanbul, which are incompatible with Vite v5{ ReactComponent as X }to default?reactquery (breaking change invite-plugin-svgrv4)moduleResolutiontoBundlerintsconfigfiles (required for Rollup 4)@storybook/react/*wildcard imports to correct package pathskeyprops inHarvestUseTypeandTransplantSpotlight(caught by pre-commit)silenceDeprecations: ['legacy-js-api']withapi: 'modern-compiler'Jira link: https://lite-farm.atlassian.net/browse/LF-5206
Type of change https://lite-farm.atlassian.net/browse/LF-5206
How Has This Been Tested?
Tested
pnpm run devandpnpm build&pnpm preview.Checklist:
pnpm i18nto help with this)