From afeeba3f6f8f7860b91fca72d8d7f3be1877e8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Fri, 8 Nov 2024 14:50:00 +0800 Subject: [PATCH] =?UTF-8?q?upgrade(package.json):=20=E5=8D=87=E7=BA=A7=20e?= =?UTF-8?q?slint=20=E7=AD=89=E7=89=88=E6=9C=AC=E9=81=BF=E5=85=8D=20install?= =?UTF-8?q?=20=E8=AD=A6=E5=91=8A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto-imports.d.ts | 3 +-- package.json | 42 +++++++++++++++++++++--------------------- vite.config.ts | 8 ++------ 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 87bc5e62..9b48bed1 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -3,7 +3,6 @@ // @ts-nocheck // noinspection JSUnusedGlobalSymbols // Generated by unplugin-auto-import -// biome-ignore lint: disable export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] @@ -84,6 +83,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/package.json b/package.json index b74335c3..30921d76 100644 --- a/package.json +++ b/package.json @@ -43,30 +43,30 @@ "vuedraggable": "4.1.0" }, "devDependencies": { - "@swc/core": "~1.6.13", - "@types/node": "^20.0.0", - "@types/nprogress": "^0.2.0", - "@types/sortablejs": "^1.15.0", - "@typescript-eslint/eslint-plugin": "^5.53.0", - "@typescript-eslint/parser": "^5.53.0", - "@vitejs/plugin-vue": "^5.0.5", - "@vue/compiler-sfc": "^3.4.3", - "consola": "^3.0.0", + "@swc/core": "1.6.13", + "@types/node": "20.0.0", + "@types/nprogress": "0.2.0", + "@types/sortablejs": "1.15.0", + "@typescript-eslint/eslint-plugin": "8.13.0", + "@typescript-eslint/parser": "8.13.0", + "@vitejs/plugin-vue": "5.0.5", + "@vue/compiler-sfc": "3.4.3", + "consola": "3.0.0", "cross-env": "7.0.3", - "eslint": "^8.34.0", - "eslint-plugin-vue": "^9.9.0", - "pinia-plugin-persist": "^1.0.0", + "eslint": "9.14.0", + "eslint-plugin-vue": "9.30.0", + "glob": "9.3.5", + "pinia-plugin-persist": "1.0.0", "prettier": "3.3.3", "sass": "1.58.3", - "terser": "^5.31.1", - "typescript": "^5.0.0", - "unplugin-auto-import": "^0.18.0", - "vite": "^5.3.3", - "vite-plugin-compression": "^0.5.1", - "vite-plugin-style-import": "^2.0.0", - "vite-plugin-top-level-await": "^1.4.1", - "vite-plugin-vue-setup-extend": "^0.4.0", - "vue-eslint-parser": "^9.1.0" + "terser": "5.31.1", + "typescript": "5.6.3", + "vite": "5.3.3", + "vite-plugin-compression": "0.5.1", + "vite-plugin-top-level-await": "1.4.1", + "unplugin-auto-import": "0.18.0", + "unplugin-vue-setup-extend-plus": "1.0.1", + "vue-eslint-parser": "9.4.3" }, "browserslist": [ "> 1%", diff --git a/vite.config.ts b/vite.config.ts index 0780255c..6176072f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,10 +1,9 @@ import vue from '@vitejs/plugin-vue'; import { resolve } from 'path'; import { defineConfig, loadEnv, ConfigEnv } from 'vite'; -import vueSetupExtend from 'vite-plugin-vue-setup-extend'; +import vueSetupExtend from 'unplugin-vue-setup-extend-plus/vite'; import AutoImport from 'unplugin-auto-import/vite'; import topLevelAwait from 'vite-plugin-top-level-await'; -import { createStyleImportPlugin, VxeTableResolve } from 'vite-plugin-style-import'; import viteCompression from 'vite-plugin-compression'; // @ts-ignore import { svgBuilder } from '/@/components/IconSelector/index'; @@ -26,14 +25,11 @@ const viteConfig = defineConfig((mode: ConfigEnv) => { plugins: [ vue(), // Vue 插件 svgBuilder('./src/assets/icons/'), // 将 SVG 文件转换成 Vue 组件 - vueSetupExtend(), // setup语法糖增强插件 + vueSetupExtend({}), // setup语法糖增强插件 AutoImport({ imports: ['vue', 'vue-router', 'pinia'], // 自动导入的依赖库数组 dts: './auto-imports.d.ts', // 自动导入类型定义文件路径 }), - createStyleImportPlugin({ - resolves: [VxeTableResolve()], // 配置vxetable 按需加载 - }), topLevelAwait({ promiseExportName: '__tla', // TLA Promise 变量名 promiseImportName: (i) => `__tla_${i}`, // TLA Promise 导入名