diff --git a/template/.babelrc b/template/.babelrc index cd05be897b..6646ce7f96 100644 --- a/template/.babelrc +++ b/template/.babelrc @@ -8,12 +8,12 @@ }], "stage-2" ], - "plugins": ["transform-runtime"]{{#if_or unit e2e}}, + "plugins": ["transform-vue-jsx", "transform-runtime"]{{#if_or unit e2e}}, "env": { "test": { "presets": ["env", "stage-2"]{{#if_eq runner "karma"}}, - "plugins": ["istanbul"]{{/if_eq}}{{#if_eq runner "jest"}}, - "plugins": ["transform-es2015-modules-commonjs", "dynamic-import-node"]{{/if_eq}} + "plugins": ["transform-vue-jsx", "istanbul"]{{/if_eq}}{{#if_eq runner "jest"}}, + "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]{{/if_eq}} } }{{/if_or}} } diff --git a/template/package.json b/template/package.json index 23ffeb6ccc..e4e637e1d5 100644 --- a/template/package.json +++ b/template/package.json @@ -84,8 +84,11 @@ {{/e2e}} "autoprefixer": "^7.1.2", "babel-core": "^6.22.1", + "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-loader": "^7.1.1", + "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-runtime": "^6.22.0", + "babel-plugin-transform-vue-jsx": "^3.5.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "chalk": "^2.0.1",