Vben 4 rokov pred
rodič
commit
e5b2cc1e98

+ 0 - 3
.env

@@ -6,6 +6,3 @@ VITE_GLOB_APP_TITLE = Vben Admin
 
 # spa shortname
 VITE_GLOB_APP_SHORT_NAME = vue_vben_admin
-
-
-VITE_DYNAMIC_IMPORT = false

+ 0 - 1
build/utils.ts

@@ -30,7 +30,6 @@ export interface ViteEnv {
   VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none';
   VITE_LEGACY: boolean;
   VITE_USE_IMAGEMIN: boolean;
-  VITE_DYNAMIC_IMPORT: boolean;
 }
 
 // Read all environment variable configuration files to process.env

+ 8 - 8
package.json

@@ -53,7 +53,7 @@
   "devDependencies": {
     "@commitlint/cli": "^12.0.1",
     "@commitlint/config-conventional": "^12.0.1",
-    "@iconify/json": "^1.1.308",
+    "@iconify/json": "^1.1.310",
     "@ls-lint/ls-lint": "^1.9.2",
     "@purge-icons/generated": "^0.7.0",
     "@types/crypto-js": "^4.0.1",
@@ -68,8 +68,8 @@
     "@types/rollup-plugin-visualizer": "^2.6.0",
     "@types/sortablejs": "^1.10.6",
     "@types/yargs": "^16.0.0",
-    "@typescript-eslint/eslint-plugin": "^4.15.2",
-    "@typescript-eslint/parser": "^4.15.2",
+    "@typescript-eslint/eslint-plugin": "^4.16.1",
+    "@typescript-eslint/parser": "^4.16.1",
     "@vitejs/plugin-legacy": "^1.3.1",
     "@vitejs/plugin-vue": "^1.1.5",
     "@vitejs/plugin-vue-jsx": "^1.1.2",
@@ -100,15 +100,15 @@
     "stylelint-config-standard": "^20.0.0",
     "stylelint-order": "^4.1.0",
     "ts-node": "^9.1.1",
-    "typescript": "4.1.5",
+    "typescript": "4.2.2",
     "vite": "^2.0.4",
-    "vite-plugin-compression": "^0.2.2",
-    "vite-plugin-html": "^2.0.2",
-    "vite-plugin-imagemin": "^0.2.8",
+    "vite-plugin-compression": "^0.2.3",
+    "vite-plugin-html": "^2.0.3",
+    "vite-plugin-imagemin": "^0.2.9",
     "vite-plugin-mock": "^2.1.5",
     "vite-plugin-purge-icons": "^0.7.0",
     "vite-plugin-pwa": "^0.5.6",
-    "vite-plugin-style-import": "^0.7.5",
+    "vite-plugin-style-import": "^0.7.6",
     "vite-plugin-theme": "^0.4.8",
     "vite-plugin-windicss": "0.6.2",
     "vue-eslint-parser": "^7.5.0",

+ 1 - 2
src/components/Basic/src/BasicArrow.vue

@@ -9,7 +9,6 @@
 </template>
 <script lang="ts">
   import { defineComponent, computed } from 'vue';
-  import { RightOutlined } from '@ant-design/icons-vue';
 
   import { useDesign } from '/@/hooks/web/useDesign';
 
@@ -19,7 +18,7 @@
 
   export default defineComponent({
     name: 'BasicArrow',
-    components: { RightOutlined, Icon },
+    components: { Icon },
     props: {
       // Expand contract, expand by default
       expand: propTypes.bool,

+ 1 - 6
src/router/helper/routeHelper.ts

@@ -18,12 +18,7 @@ let dynamicViewsModules: Record<
 
 // 动态引入
 function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
-  // TODO It may be a bug in Vite. When the conditions are not established, the dynamically imported files will still be packaged in.
-  if (!__DYNAMIC_IMPORT__) {
-    dynamicViewsModules = {};
-  } else {
-    dynamicViewsModules = dynamicViewsModules || import.meta.glob('../../views/**/*.{vue,tsx}');
-  }
+  dynamicViewsModules = dynamicViewsModules || import.meta.glob('../../views/**/*.{vue,tsx}');
 
   if (!routes) return;
   routes.forEach((item) => {

+ 1 - 2
src/views/demo/feat/ws/index.vue

@@ -54,7 +54,7 @@
 </template>
 <script lang="ts">
   import { defineComponent, reactive, watchEffect, computed, toRefs } from 'vue';
-  import { Alert, Tag, Input } from 'ant-design-vue';
+  import { Tag, Input } from 'ant-design-vue';
 
   import { PageWrapper } from '/@/components/Page';
 
@@ -66,7 +66,6 @@
       PageWrapper,
       [Input.name]: Input,
       InputTextArea: Input.TextArea,
-      Alert,
       Tag,
     },
     setup() {

+ 15 - 0
test/websocket-server/README.md

@@ -0,0 +1,15 @@
+# Websocket Server
+
+Simple background for testing ws interface
+
+## Usage
+
+```js
+
+cd ./test/websocket-server
+
+yarn install
+
+yarn start
+
+```

+ 0 - 1
types/window.d.ts

@@ -1,7 +1,6 @@
 import type { App } from 'vue';
 
 declare global {
-  declare const __DYNAMIC_IMPORT__: boolean;
   declare interface Window {
     // Global vue app instance
     __APP__: App<Element>;

+ 1 - 9
vite.config.ts

@@ -21,14 +21,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
   // The boolean type read by loadEnv is a string. This function can be converted to boolean type
   const viteEnv = wrapperEnv(env);
 
-  const {
-    VITE_PORT,
-    VITE_PUBLIC_PATH,
-    VITE_PROXY,
-    VITE_DROP_CONSOLE,
-    VITE_LEGACY,
-    VITE_DYNAMIC_IMPORT,
-  } = viteEnv;
+  const { VITE_PORT, VITE_PUBLIC_PATH, VITE_PROXY, VITE_DROP_CONSOLE, VITE_LEGACY } = viteEnv;
 
   const isBuild = command === 'build';
 
@@ -75,7 +68,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
     define: {
       // setting vue-i18-next
       // Suppress warning
-      __DYNAMIC_IMPORT__: VITE_DYNAMIC_IMPORT,
       __VUE_I18N_LEGACY_API__: false,
       __VUE_I18N_FULL_INSTALL__: false,
       __INTLIFY_PROD_DEVTOOLS__: false,

+ 65 - 65
yarn.lock

@@ -1117,10 +1117,10 @@
   dependencies:
     cross-fetch "^3.0.6"
 
-"@iconify/json@^1.1.308":
-  version "1.1.308"
-  resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.308.tgz#162210182c14af4eb217f19e1a1707b787aca2aa"
-  integrity sha512-zoVnvr5A1tpuTCzuw5EvRcWYV5rcmWLGLhEzg9+SuRAXWyT2st0ShF8hYbeHzm+MJHhJWodHVfsTu2DkshMX2g==
+"@iconify/json@^1.1.310":
+  version "1.1.310"
+  resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.310.tgz#4180cfdafbf4e218b8f78abae3434089bcb6ccf6"
+  integrity sha512-gLCuqulJPC2ly3upqPILOA1nV2fYfb99Dx64hLvneUb0r22opL+TfMfl352AjSZTFMGKV6ve8pNSAOS5gvY3vg==
 
 "@intlify/core-base@9.0.0":
   version "9.0.0"
@@ -1517,13 +1517,13 @@
   dependencies:
     "@types/yargs-parser" "*"
 
-"@typescript-eslint/eslint-plugin@^4.15.2":
-  version "4.15.2"
-  resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.2.tgz#981b26b4076c62a5a55873fbef3fe98f83360c61"
-  integrity sha512-uiQQeu9tWl3f1+oK0yoAv9lt/KXO24iafxgQTkIYO/kitruILGx3uH+QtIAHqxFV+yIsdnJH+alel9KuE3J15Q==
+"@typescript-eslint/eslint-plugin@^4.16.1":
+  version "4.16.1"
+  resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz#2caf6a79dd19c3853b8d39769a27fccb24e4e651"
+  integrity sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==
   dependencies:
-    "@typescript-eslint/experimental-utils" "4.15.2"
-    "@typescript-eslint/scope-manager" "4.15.2"
+    "@typescript-eslint/experimental-utils" "4.16.1"
+    "@typescript-eslint/scope-manager" "4.16.1"
     debug "^4.1.1"
     functional-red-black-tree "^1.0.1"
     lodash "^4.17.15"
@@ -1531,60 +1531,60 @@
     semver "^7.3.2"
     tsutils "^3.17.1"
 
-"@typescript-eslint/experimental-utils@4.15.2":
-  version "4.15.2"
-  resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.2.tgz#5efd12355bd5b535e1831282e6cf465b9a71cf36"
-  integrity sha512-Fxoshw8+R5X3/Vmqwsjc8nRO/7iTysRtDqx6rlfLZ7HbT8TZhPeQqbPjTyk2RheH3L8afumecTQnUc9EeXxohQ==
+"@typescript-eslint/experimental-utils@4.16.1":
+  version "4.16.1"
+  resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz#da7a396dc7d0e01922acf102b76efff17320b328"
+  integrity sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==
   dependencies:
     "@types/json-schema" "^7.0.3"
-    "@typescript-eslint/scope-manager" "4.15.2"
-    "@typescript-eslint/types" "4.15.2"
-    "@typescript-eslint/typescript-estree" "4.15.2"
+    "@typescript-eslint/scope-manager" "4.16.1"
+    "@typescript-eslint/types" "4.16.1"
+    "@typescript-eslint/typescript-estree" "4.16.1"
     eslint-scope "^5.0.0"
     eslint-utils "^2.0.0"
 
-"@typescript-eslint/parser@^4.15.2":
-  version "4.15.2"
-  resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.15.2.tgz#c804474321ef76a3955aec03664808f0d6e7872e"
-  integrity sha512-SHeF8xbsC6z2FKXsaTb1tBCf0QZsjJ94H6Bo51Y1aVEZ4XAefaw5ZAilMoDPlGghe+qtq7XdTiDlGfVTOmvA+Q==
+"@typescript-eslint/parser@^4.16.1":
+  version "4.16.1"
+  resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.16.1.tgz#3bbd3234dd3c5b882b2bcd9899bc30e1e1586d2a"
+  integrity sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg==
   dependencies:
-    "@typescript-eslint/scope-manager" "4.15.2"
-    "@typescript-eslint/types" "4.15.2"
-    "@typescript-eslint/typescript-estree" "4.15.2"
+    "@typescript-eslint/scope-manager" "4.16.1"
+    "@typescript-eslint/types" "4.16.1"
+    "@typescript-eslint/typescript-estree" "4.16.1"
     debug "^4.1.1"
 
-"@typescript-eslint/scope-manager@4.15.2":
-  version "4.15.2"
-  resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.2.tgz#5725bda656995960ae1d004bfd1cd70320f37f4f"
-  integrity sha512-Zm0tf/MSKuX6aeJmuXexgdVyxT9/oJJhaCkijv0DvJVT3ui4zY6XYd6iwIo/8GEZGy43cd7w1rFMiCLHbRzAPQ==
+"@typescript-eslint/scope-manager@4.16.1":
+  version "4.16.1"
+  resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz#244e2006bc60cfe46987e9987f4ff49c9e3f00d5"
+  integrity sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==
   dependencies:
-    "@typescript-eslint/types" "4.15.2"
-    "@typescript-eslint/visitor-keys" "4.15.2"
+    "@typescript-eslint/types" "4.16.1"
+    "@typescript-eslint/visitor-keys" "4.16.1"
 
-"@typescript-eslint/types@4.15.2":
-  version "4.15.2"
-  resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.2.tgz#04acf3a2dc8001a88985291744241e732ef22c60"
-  integrity sha512-r7lW7HFkAarfUylJ2tKndyO9njwSyoy6cpfDKWPX6/ctZA+QyaYscAHXVAfJqtnY6aaTwDYrOhp+ginlbc7HfQ==
+"@typescript-eslint/types@4.16.1":
+  version "4.16.1"
+  resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz#5ba2d3e38b1a67420d2487519e193163054d9c15"
+  integrity sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==
 
-"@typescript-eslint/typescript-estree@4.15.2":
-  version "4.15.2"
-  resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.2.tgz#c2f7a1e94f3428d229d5ecff3ead6581ee9b62fa"
-  integrity sha512-cGR8C2g5SPtHTQvAymEODeqx90pJHadWsgTtx6GbnTWKqsg7yp6Eaya9nFzUd4KrKhxdYTTFBiYeTPQaz/l8bw==
+"@typescript-eslint/typescript-estree@4.16.1":
+  version "4.16.1"
+  resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz#c2fc46b05a48fbf8bbe8b66a63f0a9ba04b356f1"
+  integrity sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==
   dependencies:
-    "@typescript-eslint/types" "4.15.2"
-    "@typescript-eslint/visitor-keys" "4.15.2"
+    "@typescript-eslint/types" "4.16.1"
+    "@typescript-eslint/visitor-keys" "4.16.1"
     debug "^4.1.1"
     globby "^11.0.1"
     is-glob "^4.0.1"
     semver "^7.3.2"
     tsutils "^3.17.1"
 
-"@typescript-eslint/visitor-keys@4.15.2":
-  version "4.15.2"
-  resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.2.tgz#3d1c7979ce75bf6acf9691109bd0d6b5706192b9"
-  integrity sha512-TME1VgSb7wTwgENN5KVj4Nqg25hP8DisXxNBojM4Nn31rYaNDIocNm5cmjOFfh42n7NVERxWrDFoETO/76ePyg==
+"@typescript-eslint/visitor-keys@4.16.1":
+  version "4.16.1"
+  resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz#d7571fb580749fae621520deeb134370bbfc7293"
+  integrity sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==
   dependencies:
-    "@typescript-eslint/types" "4.15.2"
+    "@typescript-eslint/types" "4.16.1"
     eslint-visitor-keys "^2.0.0"
 
 "@vitejs/plugin-legacy@^1.3.1":
@@ -8722,10 +8722,10 @@ typedarray-to-buffer@^3.1.5:
   dependencies:
     is-typedarray "^1.0.0"
 
-typescript@4.1.5:
-  version "4.1.5"
-  resolved "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
-  integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
+typescript@4.2.2:
+  version "4.2.2"
+  resolved "https://registry.npmjs.org/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c"
+  integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==
 
 uglify-js@^3.1.4:
   version "3.12.5"
@@ -8974,28 +8974,28 @@ vfile@^4.0.0:
     unist-util-stringify-position "^2.0.0"
     vfile-message "^2.0.0"
 
-vite-plugin-compression@^0.2.2:
-  version "0.2.2"
-  resolved "https://registry.npmjs.org/vite-plugin-compression/-/vite-plugin-compression-0.2.2.tgz#943a0ae209f70e7917c73ee4b5dffc02b9195041"
-  integrity sha512-QxMKUhFsTMi3XVsgTEYYrGFcU7YF69eS0JFOgMx68rDSJGgFV4Mov7mb94Fp8UN7lo8wKP7ZvM/WkeCPtd7c+g==
+vite-plugin-compression@^0.2.3:
+  version "0.2.3"
+  resolved "https://registry.npmjs.org/vite-plugin-compression/-/vite-plugin-compression-0.2.3.tgz#ddc876132966b2abcf9ab6ed387433bd188a2682"
+  integrity sha512-enF0xRQTC5hzjNYVyjg8IKF/4jl9Z1jFf8gQTdT6TI1jjd5dsOc9dvJwk/xJHi78jKhTTYgX74PicqYQ4HBg1w==
   dependencies:
     chalk "^4.1.0"
     debug "^4.3.2"
     fs-extra "^9.1.0"
 
-vite-plugin-html@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-2.0.2.tgz#3c109f8535252e133977f136b566241c8d5ca8bd"
-  integrity sha512-j1edPKZiQwvb7bxilaOrmcA+j+r38e0qkQ1RsS1KZxfrzZdjLWlXiOUaNoDCpdZ7UvXK4MR3JwAm/89HUTvSVg==
+vite-plugin-html@^2.0.3:
+  version "2.0.3"
+  resolved "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-2.0.3.tgz#9c610042b4181e95ec6c7d4b4125f3c00cbbd84b"
+  integrity sha512-1+vFAXc8G1h5NRPNsV0e3GbD8KJL71nv2N8w5y4wdt6VwwAEe6zE2WI66PBVneRBJKOw56LH7C5WJvkMxec92g==
   dependencies:
     ejs "^3.1.6"
     fs-extra "^9.1.0"
     html-minifier-terser "^5.1.1"
 
-vite-plugin-imagemin@^0.2.8:
-  version "0.2.8"
-  resolved "https://registry.npmjs.org/vite-plugin-imagemin/-/vite-plugin-imagemin-0.2.8.tgz#da07b1002b5c310a8d8ee05d57dc6274dc23c7dd"
-  integrity sha512-8OJMh/E2zkoSv/hpLB1kBCaNvnh84EBG1bv0Wr8QaPZv9U1av7TFJcvxirygE6XyfvBSrz+4IaoU5K8xGaozqQ==
+vite-plugin-imagemin@^0.2.9:
+  version "0.2.9"
+  resolved "https://registry.npmjs.org/vite-plugin-imagemin/-/vite-plugin-imagemin-0.2.9.tgz#073b6a2042808bec33f1253ed9794359c9d51c39"
+  integrity sha512-qCu2lOCLrIly8bONbqL/dJdcXxbVM+ZwLanD2vFzX6S1rCj11bXXXORGw72XC1OgxBm8SnstM1qL5hC25cV28w==
   dependencies:
     "@types/imagemin" "^7.0.0"
     "@types/imagemin-gifsicle" "^7.0.0"
@@ -9052,10 +9052,10 @@ vite-plugin-pwa@^0.5.6:
     pretty-bytes "^5.6.0"
     workbox-build "^6.1.1"
 
-vite-plugin-style-import@^0.7.5:
-  version "0.7.5"
-  resolved "https://registry.npmjs.org/vite-plugin-style-import/-/vite-plugin-style-import-0.7.5.tgz#da0455fd79e273767e84ead66e96b82a10cc891c"
-  integrity sha512-0jdP+fnt/duEmpS6gaI5yfLNUNF2KIDcQIzWAH4w1R+fwK98Zt3F+UZprIQAlreRCD+WDLPJJ/M4ECeqKzCtUQ==
+vite-plugin-style-import@^0.7.6:
+  version "0.7.6"
+  resolved "https://registry.npmjs.org/vite-plugin-style-import/-/vite-plugin-style-import-0.7.6.tgz#909a5402f3a915fb2512e2a039e9cdb360fd2882"
+  integrity sha512-EDjscCzMsmi6mJ0UbMLMkCGLo7LCdFsRJZdjO7sfUIB+2wsC1FjDJcIEGWg0Lzl+4gghv9rk+AP+WCibI83WNw==
   dependencies:
     "@rollup/pluginutils" "^4.1.0"
     change-case "^4.1.2"