# babel-jest-modules

> Babel jest transformer compatible with es6 modules

Latest version **0.0.2** (published 2019-11-23) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install babel-jest-modules
pnpm add babel-jest-modules
yarn add babel-jest-modules
bun add babel-jest-modules
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-11-23 |
| First published | 2019-11-23 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 46.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Emiliano Bovetti |
| Maintainers | emiliano.bovetti |
| Keywords | babel, jest, esmodules, modules, es6 |

## Links

- npm: https://www.npmjs.com/package/babel-jest-modules
- Repository: https://github.com/emilianobovetti/babel-jest-modules
- Homepage: https://github.com/emilianobovetti/babel-jest-modules#readme
- Issues: https://github.com/emilianobovetti/babel-jest-modules/issues
- npm.io page: https://npm.io/package/babel-jest-modules

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2019-11-23
- 0.0.1 — 2019-11-23

## README

# babel-jest-modules

<div align="center">
  <a href="https://travis-ci.org/emilianobovetti/babel-jest-modules" target="_blank">
    <img src="https://travis-ci.org/emilianobovetti/babel-jest-modules.svg?branch=master" alt="Build Status">
  </a>
  <a href="https://greenkeeper.io/" target="_blank">
    <img src="https://badges.greenkeeper.io/emilianobovetti/babel-jest-modules.svg" alt="Greenkeeper badge">
  </a>
  <a href="https://github.com/semantic-release/semantic-release" target="_blank">
    <img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" alt="semantic-release">
  </a>
</div>

When `"type": "module"` is present in a `package.json` node assumes every `.js` files in that directory tree is an ES module, then it must be imported with es6 `import`.

While [babel configuration](https://babeljs.io/docs/en/config-files) lets you use `.babelrc.cjs`/`babel.config.cjs` or a "babel" key in your `package.json`, [babel-jest](https://www.npmjs.com/package/babel-jest) seems to read exclusively `babel.config.js`.

This package should let you use jest and ES modules with the following setup:

```sh
yarn add --dev jest @babel/core @babel/preset-env babel-jest-modules
```

### package.json

```json
{
  "type": "module",
  "jest": {
    "transform": {
      "^.*\\.js$": "babel-jest-modules"
    }
  },
  "babel": {
    "presets": [
      "@babel/preset-env"
    ]
  }
}
```

---
_Source: https://npm.io/package/babel-jest-modules · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
