xiaoxian521 2 роки тому
батько
коміт
d192d842ed
4 змінених файлів з 1 додано та 213 видалено
  1. 0 13
      build/plugins.ts
  2. 0 1
      package.json
  3. 0 188
      pnpm-lock.yaml
  4. 1 11
      vite.config.ts

+ 0 - 13
build/plugins.ts

@@ -6,7 +6,6 @@ import legacy from "@vitejs/plugin-legacy";
 import vueJsx from "@vitejs/plugin-vue-jsx";
 import WindiCSS from "vite-plugin-windicss";
 import { viteMockServe } from "vite-plugin-mock";
-import styleImport from "vite-plugin-style-import";
 import VueI18n from "@intlify/vite-plugin-vue-i18n";
 // import ElementPlus from "unplugin-element-plus/vite";
 import { visualizer } from "rollup-plugin-visualizer";
@@ -53,18 +52,6 @@ export function getPluginsList(command, VITE_LEGACY) {
     }),
     // svg组件化支持
     svgLoader(),
-    // 按需加载vxe-table
-    styleImport({
-      libs: [
-        {
-          libraryName: "vxe-table",
-          esModule: true,
-          ensureStyleFile: true,
-          resolveComponent: name => `vxe-table/es/${name}`,
-          resolveStyle: name => `vxe-table/es/${name}/style.css`
-        }
-      ]
-    }),
     // ElementPlus({}),
     // mock支持
     viteMockServe({

+ 0 - 1
package.json

@@ -131,7 +131,6 @@
     "vite": "^2.9.5",
     "vite-plugin-mock": "^2.9.6",
     "vite-plugin-remove-console": "^0.0.7",
-    "vite-plugin-style-import": "1.4.1",
     "vite-plugin-windicss": "^1.8.4",
     "vite-svg-loader": "2.2.0",
     "vue-eslint-parser": "^8.2.0",

+ 0 - 188
pnpm-lock.yaml

@@ -93,7 +93,6 @@ specifiers:
   vite: ^2.9.5
   vite-plugin-mock: ^2.9.6
   vite-plugin-remove-console: ^0.0.7
-  vite-plugin-style-import: 1.4.1
   vite-plugin-windicss: ^1.8.4
   vite-svg-loader: 2.2.0
   vue: ^3.2.33
@@ -214,7 +213,6 @@ devDependencies:
   vite: 2.9.5_sass@1.50.1
   vite-plugin-mock: 2.9.6_9bee6d01fd796cb52b526d4503041d36
   vite-plugin-remove-console: 0.0.7
-  vite-plugin-style-import: 1.4.1_vite@2.9.5
   vite-plugin-windicss: 1.8.4_vite@2.9.5
   vite-svg-loader: 2.2.0
   vue-eslint-parser: 8.3.0_eslint@8.11.0
@@ -2719,16 +2717,6 @@ packages:
     engines: { node: ">=6" }
     dev: true
 
-  /camel-case/4.1.2:
-    resolution:
-      {
-        integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==
-      }
-    dependencies:
-      pascal-case: 3.1.2
-      tslib: 2.3.1
-    dev: true
-
   /camelcase-keys/6.2.2:
     resolution:
       {
@@ -2776,17 +2764,6 @@ packages:
       }
     dev: true
 
-  /capital-case/1.0.4:
-    resolution:
-      {
-        integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==
-      }
-    dependencies:
-      no-case: 3.0.4
-      tslib: 2.3.1
-      upper-case-first: 2.0.2
-    dev: true
-
   /chalk/2.4.2:
     resolution:
       {
@@ -2820,26 +2797,6 @@ packages:
       supports-color: 7.2.0
     dev: true
 
-  /change-case/4.1.2:
-    resolution:
-      {
-        integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==
-      }
-    dependencies:
-      camel-case: 4.1.2
-      capital-case: 1.0.4
-      constant-case: 3.0.4
-      dot-case: 3.0.4
-      header-case: 2.0.4
-      no-case: 3.0.4
-      param-case: 3.0.4
-      pascal-case: 3.1.2
-      path-case: 3.0.4
-      sentence-case: 3.0.4
-      snake-case: 3.0.4
-      tslib: 2.3.1
-    dev: true
-
   /chokidar/3.5.3:
     resolution:
       {
@@ -3046,17 +3003,6 @@ packages:
       utils-merge: 1.0.1
     dev: true
 
-  /constant-case/3.0.4:
-    resolution:
-      {
-        integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==
-      }
-    dependencies:
-      no-case: 3.0.4
-      tslib: 2.3.1
-      upper-case: 2.0.2
-    dev: true
-
   /conventional-changelog-angular/5.0.13:
     resolution:
       {
@@ -3535,16 +3481,6 @@ packages:
       domhandler: 4.3.1
     dev: true
 
-  /dot-case/3.0.4:
-    resolution:
-      {
-        integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==
-      }
-    dependencies:
-      no-case: 3.0.4
-      tslib: 2.3.1
-    dev: true
-
   /dot-prop/5.3.0:
     resolution:
       {
@@ -3696,13 +3632,6 @@ packages:
       }
     dev: true
 
-  /es-module-lexer/0.9.3:
-    resolution:
-      {
-        integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==
-      }
-    dev: true
-
   /es5-ext/0.10.59:
     resolution:
       {
@@ -4858,16 +4787,6 @@ packages:
       }
     dev: true
 
-  /header-case/2.0.4:
-    resolution:
-      {
-        integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==
-      }
-    dependencies:
-      capital-case: 1.0.4
-      tslib: 2.3.1
-    dev: true
-
   /hey-listen/1.0.8:
     resolution:
       {
@@ -5558,15 +5477,6 @@ packages:
       js-tokens: 4.0.0
     dev: false
 
-  /lower-case/2.0.2:
-    resolution:
-      {
-        integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==
-      }
-    dependencies:
-      tslib: 2.3.1
-    dev: true
-
   /lru-cache/6.0.0:
     resolution:
       {
@@ -5854,16 +5764,6 @@ packages:
       }
     dev: false
 
-  /no-case/3.0.4:
-    resolution:
-      {
-        integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==
-      }
-    dependencies:
-      lower-case: 2.0.2
-      tslib: 2.3.1
-    dev: true
-
   /node-releases/2.0.2:
     resolution:
       {
@@ -6066,16 +5966,6 @@ packages:
     engines: { node: ">=6" }
     dev: true
 
-  /param-case/3.0.4:
-    resolution:
-      {
-        integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==
-      }
-    dependencies:
-      dot-case: 3.0.4
-      tslib: 2.3.1
-    dev: true
-
   /parent-module/1.0.1:
     resolution:
       {
@@ -6107,26 +5997,6 @@ packages:
     engines: { node: ">= 0.8" }
     dev: true
 
-  /pascal-case/3.1.2:
-    resolution:
-      {
-        integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==
-      }
-    dependencies:
-      no-case: 3.0.4
-      tslib: 2.3.1
-    dev: true
-
-  /path-case/3.0.4:
-    resolution:
-      {
-        integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==
-      }
-    dependencies:
-      dot-case: 3.0.4
-      tslib: 2.3.1
-    dev: true
-
   /path-exists/4.0.0:
     resolution:
       {
@@ -7122,17 +6992,6 @@ packages:
       lru-cache: 6.0.0
     dev: true
 
-  /sentence-case/3.0.4:
-    resolution:
-      {
-        integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==
-      }
-    dependencies:
-      no-case: 3.0.4
-      tslib: 2.3.1
-      upper-case-first: 2.0.2
-    dev: true
-
   /shallow-equal/1.2.1:
     resolution:
       {
@@ -7245,16 +7104,6 @@ packages:
     engines: { node: ">=8.3.0" }
     dev: false
 
-  /snake-case/3.0.4:
-    resolution:
-      {
-        integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==
-      }
-    dependencies:
-      dot-case: 3.0.4
-      tslib: 2.3.1
-    dev: true
-
   /sortablejs/1.14.0:
     resolution:
       {
@@ -7961,24 +7810,6 @@ packages:
       webpack-virtual-modules: 0.4.3
     dev: true
 
-  /upper-case-first/2.0.2:
-    resolution:
-      {
-        integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==
-      }
-    dependencies:
-      tslib: 2.3.1
-    dev: true
-
-  /upper-case/2.0.2:
-    resolution:
-      {
-        integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==
-      }
-    dependencies:
-      tslib: 2.3.1
-    dev: true
-
   /uri-js/4.4.1:
     resolution:
       {
@@ -8075,25 +7906,6 @@ packages:
       }
     dev: true
 
-  /vite-plugin-style-import/1.4.1_vite@2.9.5:
-    resolution:
-      {
-        integrity: sha512-lJCRvm7+So0hHdnSJiJPg9gD5mxtL6YY0jmhEph+k7ArpsyvqOh6han2kG5htbWWDZxHkUN9d1BuTFL//yCLLQ==
-      }
-    peerDependencies:
-      vite: ">=2.0.0"
-    dependencies:
-      "@rollup/pluginutils": 4.2.0
-      change-case: 4.1.2
-      debug: 4.3.4
-      es-module-lexer: 0.9.3
-      fs-extra: 10.0.1
-      magic-string: 0.25.9
-      vite: 2.9.5_sass@1.50.1
-    transitivePeerDependencies:
-      - supports-color
-    dev: true
-
   /vite-plugin-windicss/1.8.4_vite@2.9.5:
     resolution:
       {

+ 1 - 11
vite.config.ts

@@ -78,17 +78,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
     },
     plugins: getPluginsList(command, VITE_LEGACY),
     optimizeDeps: {
-      include: [
-        "pinia",
-        "vue-i18n",
-        "lodash-es",
-        "@vueuse/core",
-        "@iconify/vue",
-        // "element-plus/lib/locale/lang/en",
-        // "element-plus/lib/locale/lang/zh-cn",
-        "vxe-table/lib/locale/lang/zh-CN",
-        "vxe-table/lib/locale/lang/en-US"
-      ],
+      include: ["pinia", "vue-i18n", "lodash-es", "@vueuse/core"],
       exclude: ["@pureadmin/theme/dist/browser-utils"]
     },
     build: {