23.4.2-3 • Published 6 years ago

evite-babel-jest v23.4.2-3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

evite-babel-jest

This is a fork of the Babel jest plugin.

Even though the original package provides the filename option to babel.transform, we still have problems with Babel transforming some of our module filenames.

According to this issue, adding filename to options should be sufficient, but we've found that only by using the transformFileSync API will Babel accurately pick up .babelrc in all cases.

Usage

If you are already using jest-cli, just add evite-babel-jest and it will automatically compile JavaScript code using babel.

yarn add --dev evite-babel-jest babel-core

Note: If you are using babel version 7 you have to install evite-babel-jest with

yarn add --dev evite-babel-jest 'babel-core@^7.0.0-0' @babel/core

If you would like to write your own preprocessor, uninstall and delete evite-babel-jest and set the config.transform option to your preprocessor.

Setup

To add evite-babel-jest as a transformer for your JavaScript code, map .js files to the evite-babel-jest module.

"transform": {
  "^.+\\.jsx?$": "evite-babel-jest"
},
23.4.2-3

6 years ago

23.4.2-1

6 years ago

23.4.2

6 years ago