Skip to content

Commit c2f4392

Browse files
committed
docs: tweak wording for compatibility
1 parent 7799977 commit c2f4392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/pages/esm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ If the library relies on any state that can cause issues if 2 separate instances
173173

174174
## Compatibility
175175

176-
[Node.js](https://nodejs.org) v12 and higher natively support ESM and the `exports` field. However, an ESM library can synchronously loaded in a CommonJS environment in only in recent Node.js versions. The following Node.js versions support synchronous `require()` for ESM libraries without any flags or warnings:
176+
[Node.js](https://nodejs.org) v12 and higher natively support ESM and the `exports` field. However, in a CommonJS environment, an ESM library can be loaded synchronously only in recent Node.js versions. The following Node.js versions support synchronous `require()` for ESM libraries without any flags or warnings:
177177

178178
- v20.19.0 and higher (LTS)
179179
- v22.12.0 and higher (LTS)
180180
- v23.4.0 and higher
181181

182-
Older versions can still load your library asynchronously using `import()`.
182+
Older versions can still load your library asynchronously using `import()` in CommonJS environments.
183183

184184
Most modern tools such as [Webpack](https://webpack.js.org), [Rollup](https://rollupjs.org), [Vite](https://vitejs.dev) etc. also support ESM and the `exports` field. See the supported conditions in the [Webpack documentation](https://webpack.js.org/guides/package-exports/#conditions).
185185

0 commit comments

Comments
 (0)