wuheng 2 سال پیش
والد
کامیت
83596a14e0
4فایلهای تغییر یافته به همراه44 افزوده شده و 5 حذف شده
  1. 1 1
      Jenkinsfile
  2. 19 4
      babel.config.js
  3. 20 0
      babel.config.json
  4. 4 0
      package.json

+ 1 - 1
Jenkinsfile

@@ -7,7 +7,7 @@ pipeline {
         stage('Build') {
             steps {
 				sh 'docker-compose down'
-                nodejs('17.9.1') {
+                nodejs('16.19.0') {
                     sh 'npm install yarn -g --registry https://registry.npm.taobao.org'
                     sh 'yarn config set registry https://registry.npm.taobao.org/'
                     sh 'yarn install'

+ 19 - 4
babel.config.js

@@ -1,7 +1,21 @@
 module.exports = {
-  presets: [
-    // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
-    '@vue/cli-plugin-babel/preset'
+  "presets": [
+    '@vue/cli-plugin-babel/preset',
+    [
+      "@babel/preset-env",
+      {
+        "useBuiltIns": "usage",
+        "corejs": 3
+      }
+    ]
+  ],
+  "plugins": [
+    ["component",
+      {
+        "libraryName": "element-ui",
+        "styleLibraryName": "theme-chalk"
+      }
+    ]
   ],
   'env': {
     'development': {
@@ -10,4 +24,5 @@ module.exports = {
       'plugins': ['dynamic-import-node']
     }
   }
-}
+}
+

+ 20 - 0
babel.config.json

@@ -0,0 +1,20 @@
+{
+    "presets": [
+      [
+        "@babel/preset-env",
+        {
+          "useBuiltIns": "usage",
+          "debug": false,
+          "corejs": 3
+        }
+      ]
+    ],
+    "plugins": [
+      [
+        "@babel/plugin-transform-runtime",
+        {
+          "corejs": 3
+        }
+      ]
+    ]
+  }

+ 4 - 0
package.json

@@ -37,6 +37,7 @@
   },
   "dependencies": {
     "@riophae/vue-treeselect": "0.4.0",
+    "async-validator": "^1.11.5",
     "axios": "0.24.0",
     "clipboard": "2.0.8",
     "core-js": "3.25.3",
@@ -64,9 +65,12 @@
     "vuex": "3.6.0"
   },
   "devDependencies": {
+    "@babel/plugin-transform-runtime": "^7.17.10",
+    "@babel/runtime-corejs3": "^7.17.9",
     "@vue/cli-plugin-babel": "4.4.6",
     "@vue/cli-plugin-eslint": "4.4.6",
     "@vue/cli-service": "4.4.6",
+    "babel-plugin-import": "^1.13.5",
     "babel-eslint": "10.1.0",
     "babel-plugin-dynamic-import-node": "2.3.3",
     "chalk": "4.1.0",