diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index 22024f5f0..cc0252065 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -97,7 +97,7 @@ "vite-plugin-eslint": "^1.7.0", "vite-plugin-html": "^3.2.0", "vite-plugin-purge-icons": "^0.8.2", - "vite-plugin-style-import": "1.4.1", + "vite-plugin-style-import": "^2.0.0", "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-windicss": "^1.8.7", "vue-tsc": "^0.39.4", diff --git a/yudao-ui-admin-vue3/vite.config.ts b/yudao-ui-admin-vue3/vite.config.ts index d5f97167a..835c7e9f3 100644 --- a/yudao-ui-admin-vue3/vite.config.ts +++ b/yudao-ui-admin-vue3/vite.config.ts @@ -6,7 +6,7 @@ import WindiCSS from 'vite-plugin-windicss' import VueJsx from '@vitejs/plugin-vue-jsx' import EslintPlugin from 'vite-plugin-eslint' import VueI18n from '@intlify/vite-plugin-vue-i18n' -import styleImport, { ElementPlusResolve } from 'vite-plugin-style-import' +import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' import PurgeIcons from 'vite-plugin-purge-icons' import DefineOptions from 'unplugin-vue-define-options/vite' @@ -55,7 +55,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { Vue(), VueJsx(), WindiCSS(), - styleImport({ + createStyleImportPlugin({ resolves: [ElementPlusResolve()], libs: [{ libraryName: 'element-plus',