Skip to content

Commit 81077d5

Browse files
committed
Add ESM note
1 parent 6737229 commit 81077d5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ pnpm add jsx-dom
1818

1919
## Usage
2020

21-
`jsx-dom` is ESM only. If you need CommonJS support, install `jsx-dom-cjs` instead. These two packages only differ in module format.
21+
`jsx-dom` is ESM only.
22+
23+
If you need CommonJS support, you can
24+
25+
1. Use this library directly if you use [Node v22](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require) or above.
26+
2. install `jsx-dom-cjs` instead. These two packages only differ in module format.
2227

2328
**Note:** If you are using [React Automatic Runtime](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx), simply set `jsxImportSource` to `jsx-dom` or `jsx-dom/min` and you can omit the import.
2429

0 commit comments

Comments
 (0)