From 23781ef2999d461be76873516f044b249d58aeff Mon Sep 17 00:00:00 2001 From: mengxiong10 <15623530290@163.com> Date: Tue, 12 Nov 2019 18:51:18 +0800 Subject: [PATCH] chore: commnet in babel --- .babelrc | 27 +++++++++++++++++++++++++++ babel.config.js | 1 + 2 files changed, 28 insertions(+) create mode 100644 .babelrc diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..f97d0ef --- /dev/null +++ b/.babelrc @@ -0,0 +1,27 @@ +// Parceljs cann't compile babel.config.js +{ + "presets": [ + [ + "@babel/preset-env", + { + "modules": false + } + ] + ], + "plugins": ["transform-vue-jsx", "@babel/plugin-transform-object-assign"], + "env": { + "test": { + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": "current" + } + } + ] + ], + "plugins": ["transform-vue-jsx"] + } + } +} diff --git a/babel.config.js b/babel.config.js index 3f68a9f..9a3f02c 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,4 @@ +// need to compile node_modules (eg: vue-runtime-helps) module.exports = api => { api.cache(false); return {