yuantianjiao 6 years ago
parent
commit
ae51bcfe77
3 changed files with 7 additions and 1 deletions
  1. 5
    1
      .babelrc
  2. 2
    0
      package.json
  3. 0
    0
      src/page/test.vue

+ 5
- 1
.babelrc View File

@@ -8,7 +8,11 @@
8 8
     }],
9 9
     "stage-2"
10 10
   ],
11
-  "plugins": ["transform-vue-jsx", "transform-runtime"],
11
+  "plugins": ["transform-vue-jsx", "transform-runtime",["import", {
12
+    "libraryName": "vant",
13
+    "libraryDirectory": "es",
14
+    "style": true
15
+  }]],
12 16
   "env": {
13 17
     "test": {
14 18
       "presets": ["env", "stage-2"],

+ 2
- 0
package.json View File

@@ -14,6 +14,7 @@
14 14
     "build": "node build/build.js"
15 15
   },
16 16
   "dependencies": {
17
+    "vant": "^1.1.14",
17 18
     "vue": "^2.5.2",
18 19
     "vue-router": "^3.0.1"
19 20
   },
@@ -25,6 +26,7 @@
25 26
     "babel-jest": "^21.0.2",
26 27
     "babel-loader": "^7.1.1",
27 28
     "babel-plugin-dynamic-import-node": "^1.2.0",
29
+    "babel-plugin-import": "^1.8.0",
28 30
     "babel-plugin-syntax-jsx": "^6.18.0",
29 31
     "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
30 32
     "babel-plugin-transform-runtime": "^6.22.0",

+ 0
- 0
src/page/test.vue View File