You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,12 @@ pnpm add jsx-dom
18
18
19
19
## Usage
20
20
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.
22
27
23
28
**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.
0 commit comments