diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 747e5b09..7e736bf7 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -48,7 +48,7 @@ export function createVitePlugins(mode: string, viteEnv: ViteEnv, isBuild: boole // vite-plugin-purge-icons vitePlugins.push(purgeIcons()) - // vite-vue-plugin-style-import + // vite-plugin-style-import if (isProdFn(mode)) { vitePlugins.push(configStyleImportPlugin(isBuild)) } diff --git a/build/vite/plugin/styleImport.ts b/build/vite/plugin/styleImport.ts index c28fbef3..27b784f8 100644 --- a/build/vite/plugin/styleImport.ts +++ b/build/vite/plugin/styleImport.ts @@ -1,8 +1,8 @@ /** * Introduces component library styles on demand. - * https://github.com/xingyuv/vite-vue-plugin-style-import + * https://github.com/xingyuv/vite-plugin-style-import */ -import { createStyleImportPlugin } from 'vite-vue-plugin-style-import' +import { createStyleImportPlugin } from 'vite-plugin-style-import' export function configStyleImportPlugin(_isBuild: boolean) { if (!_isBuild) { diff --git a/package.json b/package.json index ded8fd10..4f03b624 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi-ui-admin-vben", - "version": "1.0.1", + "version": "1.0.2", "author": { "name": "xingyuv", "email": "xingyu4j@vip.qq.com", @@ -115,7 +115,7 @@ "stylelint-config-recommended-vue": "^1.4.0", "stylelint-config-standard": "^31.0.0", "stylelint-order": "^6.0.3", - "terser": "^5.16.6", + "terser": "^5.16.8", "typescript": "^5.0.2", "unocss": "^0.50.6", "unplugin-vue-setup-extend-plus": "^0.4.9", @@ -128,7 +128,7 @@ "vite-plugin-svg-icons": "^2.0.1", "vite-vue-plugin-html": "^1.0.1", "vite-vue-plugin-theme": "^1.0.0", - "vite-vue-plugin-style-import": "^0.1.0", + "vite-plugin-style-import": "^2.0.0", "vue-eslint-parser": "^9.1.0", "vue-tsc": "^1.2.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 000e9f35..0ffd82bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,7 +74,7 @@ specifiers: stylelint-config-recommended-vue: ^1.4.0 stylelint-config-standard: ^31.0.0 stylelint-order: ^6.0.3 - terser: ^5.16.6 + terser: ^5.16.8 tinymce: ^5.10.7 typescript: ^5.0.2 unocss: ^0.50.6 @@ -86,9 +86,9 @@ specifiers: vite-plugin-progress: ^0.0.6 vite-plugin-purge-icons: ^0.9.2 vite-plugin-pwa: ^0.14.6 + vite-plugin-style-import: ^2.0.0 vite-plugin-svg-icons: ^2.0.1 vite-vue-plugin-html: ^1.0.1 - vite-vue-plugin-style-import: ^0.1.0 vite-vue-plugin-theme: ^1.0.0 vue: ^3.2.47 vue-eslint-parser: ^9.1.0 @@ -150,7 +150,7 @@ devDependencies: '@types/sortablejs': 1.15.1 '@typescript-eslint/eslint-plugin': 5.56.0_2hcjazgfnbtq42tcc73br2vup4 '@typescript-eslint/parser': 5.56.0_j4766f7ecgqbon3u7zlxn5zszu - '@vitejs/plugin-legacy': 4.0.2_terser@5.16.6+vite@4.2.1 + '@vitejs/plugin-legacy': 4.0.2_terser@5.16.8+vite@4.2.1 '@vitejs/plugin-vue': 4.1.0_vite@4.2.1+vue@3.2.47 '@vitejs/plugin-vue-jsx': 3.0.1_vite@4.2.1+vue@3.2.47 '@vue/compiler-sfc': 3.2.47 @@ -183,19 +183,19 @@ devDependencies: stylelint-config-recommended-vue: 1.4.0_o7z2z2yv565o3a3uaodintvte4 stylelint-config-standard: 31.0.0_stylelint@15.3.0 stylelint-order: 6.0.3_stylelint@15.3.0 - terser: 5.16.6 + terser: 5.16.8 typescript: 5.0.2 unocss: 0.50.6_tpn2xygpgdsxofkv7wgj5mw654 unplugin-vue-setup-extend-plus: 0.4.9 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy vite-plugin-compression: 0.5.1_vite@4.2.1 vite-plugin-mkcert: 1.13.4_vite@4.2.1 vite-plugin-progress: 0.0.6_vite@4.2.1 vite-plugin-purge-icons: 0.9.2_vite@4.2.1 vite-plugin-pwa: 0.14.6_vite@4.2.1 + vite-plugin-style-import: 2.0.0_vite@4.2.1 vite-plugin-svg-icons: 2.0.1_vite@4.2.1 vite-vue-plugin-html: 1.0.1_rollup@3.20.2+vite@4.2.1 - vite-vue-plugin-style-import: 0.1.0_rollup@3.20.2+vite@4.2.1 vite-vue-plugin-theme: 1.0.0_vite@4.2.1 vue-eslint-parser: 9.1.0_eslint@8.36.0 vue-tsc: 1.2.0_typescript@5.0.2 @@ -2497,6 +2497,14 @@ packages: rollup: 2.79.1 dev: true + /@rollup/pluginutils/4.2.1: + resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} + engines: {node: '>= 8.0.0'} + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + /@rollup/pluginutils/5.0.2_rollup@3.20.2: resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} @@ -2980,12 +2988,12 @@ packages: chokidar: 3.5.3 fast-glob: 3.2.12 magic-string: 0.30.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - rollup dev: true - /@vitejs/plugin-legacy/4.0.2_terser@5.16.6+vite@4.2.1: + /@vitejs/plugin-legacy/4.0.2_terser@5.16.8+vite@4.2.1: resolution: {integrity: sha512-ivnt9sCkgwJTYTWLjuvY6H/HTuiQC1EgzAPkiAvi0yNAssiqOJjyjhG3hAK5LFUUorE0w9kGxn8K0f/74DlbxQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2999,8 +3007,8 @@ packages: magic-string: 0.30.0 regenerator-runtime: 0.13.11 systemjs: 6.14.0 - terser: 5.16.6 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + terser: 5.16.8 + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - supports-color dev: true @@ -3015,7 +3023,7 @@ packages: '@babel/core': 7.21.0 '@babel/plugin-transform-typescript': 7.21.0_@babel+core@7.21.0 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.21.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy vue: 3.2.47 transitivePeerDependencies: - supports-color @@ -3028,7 +3036,7 @@ packages: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy vue: 3.2.47 dev: true @@ -3980,6 +3988,10 @@ packages: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} dev: true + /console/0.7.2: + resolution: {integrity: sha512-+JSDwGunA4MTEgAV/4VBKwUHonP8CzJ/6GIuwPi6acKFqFfHUdSGCm89ZxZ5FfGWdZfkdgAroy5bJ5FSeN/t4g==} + dev: true + /constant-case/3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: @@ -4722,8 +4734,8 @@ packages: which-typed-array: 1.1.9 dev: true - /es-module-lexer/1.2.0: - resolution: {integrity: sha512-2BMfqBDeVCcOlLaL1ZAfp+D868SczNpKArrTM3dhpd7dK/OVlogzY15qpUngt+LMTq5UC/csb9vVQAgupucSbA==} + /es-module-lexer/0.9.3: + resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} dev: true /es-set-tostringtag/2.0.1: @@ -5655,7 +5667,7 @@ packages: entities: 4.4.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.16.6 + terser: 5.16.8 dev: true /html-tags/3.2.0: @@ -7766,7 +7778,7 @@ packages: jest-worker: 26.6.2 rollup: 2.79.1 serialize-javascript: 4.0.0 - terser: 5.16.6 + terser: 5.16.8 dev: true /rollup-plugin-visualizer/5.9.0_rollup@3.20.2: @@ -8476,8 +8488,8 @@ packages: unique-string: 2.0.0 dev: true - /terser/5.16.6: - resolution: {integrity: sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==} + /terser/5.16.8: + resolution: {integrity: sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -8932,7 +8944,7 @@ packages: chalk: 4.1.2 debug: 4.3.4 fs-extra: 10.1.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - supports-color dev: true @@ -8947,7 +8959,7 @@ packages: axios: 1.3.4_debug@4.3.4 debug: 4.3.4 picocolors: 1.0.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - encoding - supports-color @@ -8962,7 +8974,7 @@ packages: picocolors: 1.0.0 progress: 2.0.3 rd: 2.0.1 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy dev: true /vite-plugin-purge-icons/0.9.2_vite@4.2.1: @@ -8974,7 +8986,7 @@ packages: '@purge-icons/core': 0.9.1 '@purge-icons/generated': 0.9.0 rollup-plugin-purge-icons: 0.9.1 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - encoding - supports-color @@ -8990,7 +9002,7 @@ packages: fast-glob: 3.2.12 pretty-bytes: 6.1.0 rollup: 3.20.2 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy workbox-build: 6.5.4 workbox-window: 6.5.4 transitivePeerDependencies: @@ -8998,6 +9010,21 @@ packages: - supports-color dev: true + /vite-plugin-style-import/2.0.0_vite@4.2.1: + resolution: {integrity: sha512-qtoHQae5dSUQPo/rYz/8p190VU5y19rtBaeV7ryLa/AYAU/e9CG89NrN/3+k7MR8mJy/GPIu91iJ3zk9foUOSA==} + peerDependencies: + vite: '>=2.0.0' + dependencies: + '@rollup/pluginutils': 4.2.1 + change-case: 4.1.2 + console: 0.7.2 + es-module-lexer: 0.9.3 + fs-extra: 10.1.0 + magic-string: 0.25.9 + pathe: 0.2.0 + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy + dev: true + /vite-plugin-svg-icons/2.0.1_vite@4.2.1: resolution: {integrity: sha512-6ktD+DhV6Rz3VtedYvBKKVA2eXF+sAQVaKkKLDSqGUfnhqXl3bj5PPkVTl3VexfTuZy66PmINi8Q6eFnVfRUmA==} peerDependencies: @@ -9011,7 +9038,7 @@ packages: pathe: 0.2.0 svg-baker: 1.7.0 svgo: 2.8.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - supports-color dev: true @@ -9033,24 +9060,7 @@ packages: html-minifier-terser: 7.1.0 node-html-parser: 6.1.5 pathe: 1.1.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e - transitivePeerDependencies: - - rollup - dev: true - - /vite-vue-plugin-style-import/0.1.0_rollup@3.20.2+vite@4.2.1: - resolution: {integrity: sha512-KR461+LIYHE7w7Y1t2zV2qYtO9pwfpQPhBOHGUuGS6KAsC5Yyxw3oCbaBT+7Q3WRvcjHfXNZesb6I8Va/PtvHA==} - peerDependencies: - vite: '>=4.2.0' - dependencies: - '@rollup/pluginutils': 5.0.2_rollup@3.20.2 - change-case: 4.1.2 - consola: 2.15.3 - es-module-lexer: 1.2.0 - fs-extra: 11.1.1 - magic-string: 0.30.0 - pathe: 1.1.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - rollup dev: true @@ -9068,12 +9078,12 @@ packages: esbuild-plugin-alias: 0.2.1 picocolors: 1.0.0 tinycolor2: 1.6.0 - vite: 4.2.1_sq5ln4aqyose73xngooyn3aq4e + vite: 4.2.1_qrgdxfszmr3nib6z5ws3ht5idy transitivePeerDependencies: - supports-color dev: true - /vite/4.2.1_sq5ln4aqyose73xngooyn3aq4e: + /vite/4.2.1_qrgdxfszmr3nib6z5ws3ht5idy: resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -9104,7 +9114,7 @@ packages: postcss: 8.4.21 resolve: 1.22.1 rollup: 3.20.2 - terser: 5.16.6 + terser: 5.16.8 optionalDependencies: fsevents: 2.3.2 dev: true diff --git a/vite.config.ts b/vite.config.ts index 921c38e0..05785a1e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -60,7 +60,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { drop: VITE_DROP_CONSOLE ? ['console', 'debugger'] : [] }, build: { - target: 'es2015', + target: 'esnext', cssTarget: 'chrome80', outDir: OUTPUT_DIR, // minify: 'terser',