Skip to content

Commit 2569870

Browse files
authored
Docs: improve babel-jest README.md file (#14957)
1 parent 09ed1af commit 2569870

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/babel-jest/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,18 @@ _Note: this step is only required if you are using `babel-jest` with additional
1818

1919
To explicitly define `babel-jest` as a transformer for your JavaScript code, map _.js_ files to the `babel-jest` module. Typescript files are also supported.
2020

21+
By default, it loads your existing Babel configuration (if any)
22+
2123
```json
2224
"transform": {
2325
"\\.[jt]sx?$": "babel-jest"
2426
},
2527
```
28+
29+
You can also pass further [babel options](https://babeljs.io/docs/options)
30+
31+
```json
32+
"transform": {
33+
"\\.[jt]sx?$": ["babel-jest", { "extends": "./babel.config.js", "plugins": ["babel-plugin-transform-import-meta"] }]
34+
},
35+
```

0 commit comments

Comments
 (0)