Migrate to Vite 5 and adjust configurations
This commit updates the `vite` dependency to the latest version (5.1.X) and makes necessary adjustments to accommodate deprecations and new features introduced in Vite 5.1.X. Changes include: - Modify the import statement for SVG files to use `query: '?raw'` syntax due to the deprecation of the `as: raw` option. - Update `moduleResolution` setting to `Bundler` in `tsconfig.json` to support the new TypeScript 5 option, aligning with Vite 5's migration guide for Rollup 4 compatibility without requiring file extensions on relative imports. Plugin migrations for Vite 5 support: - Bump `@modyfi/vite-plugin-yaml`, see @modyfi/vite-plugin-yaml#22. - Bump `electron-vite`, see alex8088/electron-vite#335. - Bump `vitejs/plugin-legacy`. - Bump `vitejs/vite-plugin-vue`, see vitejs/vite-plugin-vue#290.
This commit is contained in:
4183
package-lock.json
generated
4183
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -45,14 +45,14 @@
|
|||||||
"vue": "^3.3.7"
|
"vue": "^3.3.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@modyfi/vite-plugin-yaml": "^1.0.4",
|
"@modyfi/vite-plugin-yaml": "^1.1.0",
|
||||||
"@rushstack/eslint-patch": "^1.6.1",
|
"@rushstack/eslint-patch": "^1.6.1",
|
||||||
"@types/ace": "^0.0.49",
|
"@types/ace": "^0.0.49",
|
||||||
"@types/file-saver": "^2.0.5",
|
"@types/file-saver": "^2.0.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
||||||
"@typescript-eslint/parser": "^6.17.0",
|
"@typescript-eslint/parser": "^6.17.0",
|
||||||
"@vitejs/plugin-legacy": "^4.1.1",
|
"@vitejs/plugin-legacy": "^5.3.2",
|
||||||
"@vitejs/plugin-vue": "^4.4.0",
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
"@vue/eslint-config-airbnb-with-typescript": "^8.0.0",
|
"@vue/eslint-config-airbnb-with-typescript": "^8.0.0",
|
||||||
"@vue/eslint-config-typescript": "^12.0.0",
|
"@vue/eslint-config-typescript": "^12.0.0",
|
||||||
"@vue/test-utils": "^2.4.1",
|
"@vue/test-utils": "^2.4.1",
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
"electron-builder": "^24.6.4",
|
"electron-builder": "^24.6.4",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-icon-builder": "^2.0.1",
|
"electron-icon-builder": "^2.0.1",
|
||||||
"electron-vite": "^1.0.28",
|
"electron-vite": "^2.1.0",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-cypress": "^2.15.1",
|
"eslint-plugin-cypress": "^2.15.1",
|
||||||
"eslint-plugin-vue": "^9.19.2",
|
"eslint-plugin-vue": "^9.19.2",
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
"terser": "^5.21.0",
|
"terser": "^5.21.0",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"vite": "^4.4.11",
|
"vite": "^5.1.6",
|
||||||
"vitest": "^0.34.6",
|
"vitest": "^0.34.6",
|
||||||
"vue-tsc": "^1.8.19",
|
"vue-tsc": "^1.8.19",
|
||||||
"yaml-lint": "^1.7.0"
|
"yaml-lint": "^1.7.0"
|
||||||
|
|||||||
@@ -48,8 +48,9 @@ async function loadSvg(name: IconName, loaders: FileLoaders): Promise<string> {
|
|||||||
return modifiedContent;
|
return modifiedContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
const RawSvgLoaders = import.meta.glob('@/presentation/assets/icons/**/*.svg', {
|
const RawSvgLoaders: FileLoaders = import.meta.glob<string>('@/presentation/assets/icons/**/*.svg', {
|
||||||
as: 'raw', // This will load the SVG file content as a string.
|
query: '?raw',
|
||||||
|
import: 'default',
|
||||||
/*
|
/*
|
||||||
Using `eager: true` to preload all icons.
|
Using `eager: true` to preload all icons.
|
||||||
Pros:
|
Pros:
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2017",
|
"target": "ES2017",
|
||||||
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||||
"module": "esnext",
|
"module": "ESNext",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"downlevelIteration": true,
|
"downlevelIteration": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Bundler",
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user