Bladeren bron

update package

dusenyao 3 jaren geleden
bovenliggende
commit
c6258e1e97
3 gewijzigde bestanden met toevoegingen van 977 en 144 verwijderingen
  1. 943 119
      package-lock.json
  2. 22 21
      package.json
  3. 12 4
      vue.config.js

File diff suppressed because it is too large
+ 943 - 119
package-lock.json


+ 22 - 21
package.json

@@ -15,38 +15,39 @@
   "dependencies": {
     "ailp-book-question-ui": "file:../ailp-book-question-ui-0.1.1.tgz",
     "awe-dnd": "^0.3.4",
-    "axios": "^0.21.4",
+    "axios": "^0.23.0",
     "book-ui": "file:../book-ui-0.1.12.tgz",
-    "core-js": "^3.10.1",
-    "element-ui": "^2.15.1",
+    "core-js": "^3.18.3",
+    "element-ui": "^2.15.6",
     "gcls-book-question-ui": "file:../gcls-book-question-ui-0.1.0.tgz",
     "jquery": "^3.6.0",
     "js-cookie": "^2.2.1",
     "jsplumb": "^2.15.6",
     "normalize.css": "^8.0.1",
     "nprogress": "^0.2.0",
-    "vue": "^2.6.12",
+    "vue": "^2.6.14",
     "vue-i18n": "^8.24.0",
     "vue-pdf": "^4.3.0",
-    "vue-router": "^3.5.1",
+    "vue-router": "^3.5.2",
     "vue-video-player": "^5.0.2",
     "vuex": "^3.6.2"
   },
   "devDependencies": {
-    "@babel/core": "^7.13.15",
-    "@babel/preset-env": "^7.13.15",
-    "@vue/cli-plugin-babel": "~4.5.12",
-    "@vue/cli-plugin-eslint": "~4.5.12",
-    "@vue/cli-plugin-router": "~4.5.12",
-    "@vue/cli-plugin-unit-jest": "^4.5.12",
-    "@vue/cli-plugin-vuex": "~4.5.12",
-    "@vue/cli-service": "~4.5.12",
+    "@babel/core": "^7.15.8",
+    "@babel/preset-env": "^7.15.8",
+    "@vue/cli-plugin-babel": "~4.5.14",
+    "@vue/cli-plugin-eslint": "~4.5.14",
+    "@vue/cli-plugin-router": "~4.5.14",
+    "@vue/cli-plugin-unit-jest": "^4.5.14",
+    "@vue/cli-plugin-vuex": "~4.5.14",
+    "@vue/cli-service": "~4.5.14",
     "@vue/eslint-config-prettier": "^6.0.0",
     "@vue/test-utils": "^1.1.4",
     "babel-eslint": "^10.1.0",
     "babel-jest": "^26.6.3",
     "babel-loader": "^8.2.2",
     "babel-plugin-dynamic-import-node": "^2.3.3",
+    "compression-webpack-plugin": "^6.1.1",
     "eslint": "^7.24.0",
     "eslint-plugin-prettier": "^3.3.1",
     "eslint-plugin-vue": "^7.8.0",
@@ -56,17 +57,17 @@
     "sass": "^1.32.8",
     "sass-loader": "^10.1.1",
     "script-ext-html-webpack-plugin": "^2.1.5",
-    "stylelint": "^13.12.0",
+    "stylelint": "^13.13.1",
     "stylelint-config-recess-order": "^2.5.0",
     "stylelint-config-sass-guidelines": "^8.0.0",
-    "stylelint-config-standard": "^21.0.0",
-    "stylelint-declaration-block-no-ignored-properties": "^2.3.0",
-    "stylelint-scss": "^3.19.0",
+    "stylelint-config-standard": "^22.0.0",
+    "stylelint-declaration-block-no-ignored-properties": "^2.4.0",
+    "stylelint-scss": "^3.21.0",
     "stylelint-webpack-plugin": "^2.1.1",
-    "svg-sprite-loader": "^6.0.5",
-    "svgo": "^2.3.1",
-    "vue-loader": "^15.9.6",
-    "vue-template-compiler": "^2.6.12"
+    "svg-sprite-loader": "^6.0.10",
+    "svgo": "^2.7.0",
+    "vue-loader": "^15.9.8",
+    "vue-template-compiler": "^2.6.14"
   },
   "browserslist": [
     "> 1%",

+ 12 - 4
vue.config.js

@@ -1,5 +1,6 @@
 const path = require('path');
 const StyleLintPlugin = require('stylelint-webpack-plugin');
+const CompressionPlugin = require('compression-webpack-plugin');
 const defaultSettings = require('./src/settings.js');
 
 function resolve(dir) {
@@ -42,13 +43,13 @@ module.exports = {
   runtimeCompiler: true,
   productionSourceMap: false,
   devServer: {
-    port: port,
+    port,
     open: true, // 默认false true自动打开网页
     overlay: {
       warnings: false,
       errors: true
     },
-    proxy: proxy
+    proxy
   },
   css: {
     loaderOptions: {
@@ -59,7 +60,7 @@ module.exports = {
     }
   },
   configureWebpack: {
-    name: name,
+    name,
     // 配置路径别名
     resolve: {
       alias: {
@@ -67,14 +68,21 @@ module.exports = {
       }
     },
     devtool: NODE_ENV === 'development' ? 'source-map' : '',
-    // stylelint 配置
     plugins: [
+      // stylelint 配置
       new StyleLintPlugin({
         files: ['**/*.{vue,htm,html,css,sss,less,scss,sass}'],
         fix: false, // 是否自动修复
         cache: true, // 是否缓存
         emitErrors: true,
         failOnError: false
+      }),
+      new CompressionPlugin({
+        algorithm: 'gzip', // 使用gzip压缩
+        test: /\.js$|\.html$|\.css$/, // 匹配文件名
+        minRatio: 0.8, // 压缩率小于0.8才会压缩
+        threshold: 10240, // 对超过10k的数据压缩
+        deleteOriginalAssets: false // 是否删除未压缩的源文件,谨慎设置,如果希望提供非gzip的资源,可不设置或者设置为false(比如删除打包后的gz后还可以加载到原始资源文件)
       })
     ]
   },

Some files were not shown because too many files changed in this diff