Closed
Description
My project use Babel 7, it seems not work 😞
Any way to force 2 use vue-jest
built in Babel config?
Or provide a way to write custom transformer like babel-jest
does
Error stack
Plugin 27 specified in "/Users/drake/Projects/bill/node_modules/babel-preset-env/lib/index.js" provided an invalid property of "default" (While processing preset: "/Users/drake/Projects/bill/node_modules/babel-preset-env/lib/index.js")
at Plugin.init (../fin-scripts/node_modules/babel-core/lib/transformation/plugin.js:131:13)
at Function.normalisePlugin (../fin-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
at ../fin-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
at Array.map (<anonymous>)
at Function.normalisePlugins (../fin-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (../fin-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at ../fin-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
at ../fin-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
at Array.map (<anonymous>)
at OptionManager.resolvePresets (../fin-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
.babelrc.js
const { moduleName } = require('./build/myUtils')
const browsers = {
pc: ['> 1%', 'last 2 versions'],
h5: ['iOS >= 8', 'Android >= 4.4'],
}
module.exports = {
presets: [
[
'env',
{
modules: false,
useBuiltIns: 'usage',
shippedProposals: true,
targets: {
browsers: browsers[moduleName] || browsers.pc,
},
},
],
],
plugins: ['syntax-dynamic-import'],
}
package.json
"babel-core": "^7.0.0-beta.2"
"babel-preset-env": "^2.0.0-beta.2"
"vue-jest": "^1.4.0"
Metadata
Metadata
Assignees
Labels
No labels