Vue Babel Core

Posted on  by admin

Modified2 years, 1 month ago.

Wrapping it up

I'm trying to use Jest with VueJS, however I'm getting Cannot find module 'babel-core' at Object. (node_modules/vue-jest/lib/compilers/babel-compiler.js:1:15).

The only way I could fix this was adding . Then test pass, but I do not want to keep the 'beta' version in my package.json, and it is weird to have @babel/core and babel-core together, knowing they are the same package in different versions.

DEFAULT_EXTENSIONS

I see the error seems to be in Vue-Jest, but it is already in last version. Below is my current package.json that breaks (without "babel-core": "^7.0.0-beta.47").

transformFromAstAsync

Any help would be appreciated. 11 gold badge55 silver badges2222 bronze badges. 2222 bronze badges. Zaan ChiZaan Chi. All transformations will use your local configuration files.

babel.transform(code: string, options?: Object, callback: Function). Transforms the passed in code. Calling a callback with an object with the generated code,source map, and AST. In Babel 6, this method was synchronous and transformSync did not exist.

Not the answer you're looking for? Browse other questions tagged vue.jsvuejs2jestjsbabeljs or ask your own question.

transform

  • config.rule('js')
  • config.rule('js').use('babel-loader')