Skip to content

Commit bbb1446

Browse files
committed
fix: ensure correct parser options for file extension are set
1 parent c79b1f9 commit bbb1446

File tree

8 files changed

+1551
-1633
lines changed

8 files changed

+1551
-1633
lines changed

.babelrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = function (api) {
55
[
66
'@babel/preset-env',
77
api.env('es5')
8-
? { forceAllTransforms: true }
8+
? { targets: { node: '12' } }
99
: {
1010
modules: process.env.OUTPUT_ESM ? false : 'auto',
1111
targets: { node: '12' },

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:16
5+
- image: cimg/node:16.20.0
66

77
steps:
88
- checkout

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,12 @@ import { jsParser } from 'babel-parse-wild-code'
121121
```
122122

123123
The fallback parser used for parsing `.js` files when `babel-parse-wild-code` failed to load Babel modules or config for the file's directory.
124+
Note: this is the same as `jsxParser`, but `jsxParser` is exported for completeness.
125+
126+
## `jsxParser`
127+
128+
```ts
129+
import { jsxParser } from 'babel-parse-wild-code'
130+
```
131+
132+
The fallback parser used for parsing `.jsx` files when `babel-parse-wild-code` failed to load Babel modules or config for the file's directory.

index.cjs

Lines changed: 239 additions & 453 deletions
Large diffs are not rendered by default.

index.mjs

Lines changed: 35 additions & 14 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)