Skip to content

Commit af27d8e

Browse files
committed
docs: update CJS guidance to use require() on Node >= 20.19.0 (no dynamic import needed)
1 parent 0938ca0 commit af27d8e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ npm install postcss-values-parser --save-dev
2727
- Node.js >= 20.19.0
2828
- PostCSS >= 8.4.14 (peer dependency)
2929

30-
Note: This package is ESM‑only. Use `import` in Node.js or load from CommonJS via dynamic import:
30+
Note: This package is ESM‑only. Use `import` in Node.js. In CommonJS on Node.js 20.19.0+ you can `require()` it:
3131

3232
```js
33-
const mod = await import('postcss-values-parser');
33+
// CommonJS (Node >= 20.19.0)
34+
const { parse } = require('postcss-values-parser');
3435
```
3536

3637
## Benefits

0 commit comments

Comments
 (0)