From b4a0bd7e011726b4a7f018b97d8d3ead8ee286e6 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 9 Dec 2022 20:19:37 +0100 Subject: chore(frontend): upgrade to vite 4 vite-plugin-inject-preload and vite-plugin-pwa generate peer dependency warnings, because they still require vite 3, but this does not lead to any incorrect behavior in practice. --- subprojects/frontend/package.json | 6 +++--- subprojects/frontend/vite.config.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'subprojects') diff --git a/subprojects/frontend/package.json b/subprojects/frontend/package.json index 36476024..db5d3f68 100644 --- a/subprojects/frontend/package.json +++ b/subprojects/frontend/package.json @@ -40,6 +40,7 @@ "@material-icons/svg": "^1.0.33", "@mui/icons-material": "5.10.16", "@mui/material": "5.10.17", + "@vitejs/plugin-react-swc": "^3.0.0", "ansi-styles": "^6.2.1", "escape-string-regexp": "^5.0.0", "lodash-es": "^4.17.21", @@ -62,13 +63,12 @@ "@types/html-minifier-terser": "^7.0.0", "@types/lodash-es": "^4.17.6", "@types/ms": "^0.7.31", - "@types/node": "^18.11.12", + "@types/node": "^18.11.13", "@types/prettier": "^2.7.1", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", "@typescript-eslint/eslint-plugin": "^5.46.0", "@typescript-eslint/parser": "^5.46.0", - "@vitejs/plugin-react": "^2.2.0", "@xstate/cli": "^0.4.0", "cross-env": "^7.0.3", "eslint": "^8.29.0", @@ -85,7 +85,7 @@ "html-minifier-terser": "^7.1.0", "prettier": "^2.8.1", "typescript": "4.9.3", - "vite": "^3.2.5", + "vite": "^4.0.0", "vite-plugin-inject-preload": "^1.1.1", "vite-plugin-pwa": "^0.13.3", "workbox-window": "^6.5.4" diff --git a/subprojects/frontend/vite.config.ts b/subprojects/frontend/vite.config.ts index 2c810912..08b3db0c 100644 --- a/subprojects/frontend/vite.config.ts +++ b/subprojects/frontend/vite.config.ts @@ -4,9 +4,9 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { lezer } from '@lezer/generator/rollup'; -import react from '@vitejs/plugin-react'; +import react from '@vitejs/plugin-react-swc'; import { minify } from 'html-minifier-terser'; -import { defineConfig, PluginOption } from 'vite'; +import { defineConfig, type PluginOption } from 'vite'; import injectPreload from 'vite-plugin-inject-preload'; import { VitePWA } from 'vite-plugin-pwa'; @@ -104,8 +104,8 @@ export default defineConfig({ workbox: { globPatterns: [ '**/*.{css,html,js}', - 'inter-latin-variable-wghtOnly-normal.*.woff2', - 'jetbrains-mono-latin-variable-wghtOnly-{normal,italic}.*.woff2', + 'inter-latin-variable-wghtOnly-normal-*.woff2', + 'jetbrains-mono-latin-variable-wghtOnly-{normal,italic}-*.woff2', ], dontCacheBustURLsMatching: /\.(?:css|js|woff2?)$/, navigateFallbackDenylist: [/^\/xtext-service/], -- cgit v1.2.3-54-g00ecf