canirequire › ESM-only › @rolldown/pluginutils
Is @rolldown/pluginutils ESM-only? Can you require() it?
Plugin utilities for Rolldown
Last verified Sep 9, 2026 against @rolldown/pluginutils@1.0.1. JSON
ESM-only ESM-only — it has never shipped a CommonJS build
@rolldown/pluginutils has been ESM-only since its first stable release. There is no version you can require() on Node.js 18 or older.
On Node.js 20.19+, 22.12+ and every newer release, require("@rolldown/pluginutils") works anyway: Node can load synchronous ES modules through require(). Verified on Node 20, 22, 24, 26. Node.js 18 and older still fail with ERR_REQUIRE_ESM.
Does @rolldown/pluginutils@1.0.1 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@rolldown/pluginutils") from a CommonJS file and import "@rolldown/pluginutils" from an ES module.
| Runtime | require("@rolldown/pluginutils") | import "@rolldown/pluginutils" |
|---|---|---|
| Node.js 18 | ✗ failsERR_REQUIRE_ESM | ✓ works |
| Node.js 20 | ✓ works | ✓ works |
| Node.js 22 | ✓ works | ✓ works |
| Node.js 24 | ✓ works | ✓ works |
| Node.js 26 | ✓ works | ✓ works |
| Bun 1.4 | ✓ works | ✓ works |
How to import @rolldown/pluginutils
ES modules (import)
import pluginutils from "@rolldown/pluginutils";CommonJS (require)
// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const pluginutils = require("@rolldown/pluginutils");
// Any Node.js version:
const pluginutils = await import("@rolldown/pluginutils");Module format by version
Derived from the type, main and exports fields of every stable release on npm (2 versions; the newest 2 shown).
| Versions | Format | First published |
|---|---|---|
| 1.0.0 – 1.0.1 | ESM-only | May 7, 2026 |
Frequently asked
Is @rolldown/pluginutils ESM-only?
@rolldown/pluginutils@1.0.1 is ESM-only. @rolldown/pluginutils has been ESM-only since its first stable release. There is no version you can require() on Node.js 18 or older.
Which version of @rolldown/pluginutils still supports CommonJS / require()?
None. @rolldown/pluginutils has always been ESM-only. Use import, or await import("@rolldown/pluginutils") from CommonJS.
How do I use @rolldown/pluginutils from a CommonJS file?
Use a dynamic import: const mod = await import("@rolldown/pluginutils"). On Node.js 20.19+, 22.12+ and newer, a plain require("@rolldown/pluginutils") also works for ESM packages that do not use top-level await.
Does @rolldown/pluginutils work in Bun?
Yes. import "@rolldown/pluginutils" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @rolldown/pluginutils ship TypeScript types?
No. @rolldown/pluginutils ships no type declarations and there is no @types package for it.
Links
Other esm-only packages
- ansi-styles 7.0.0last CJS
5.2.0 - strip-ansi 7.2.0last CJS
6.0.1 - commander 15.0.0last CJS
14.0.3 - supports-color 11.0.0last CJS
8.1.1 - chalk 6.0.0last CJS
4.1.2 - tslib 2.8.1last CJS
2.5.2 - string-width 8.2.2last CJS
4.2.3 - ansi-regex 6.3.0last CJS
5.0.1
Similar popularity
- @babel/helper-string-parser 8.0.0ESM-only
- @babel/helper-plugin-utils 8.0.1ESM-only
- @smithy/util-utf8 4.5.2CommonJS
- @babel/helper-validator-option 8.0.0ESM-only
- @eslint/js 10.0.1CommonJS
- @eslint-community/regexpp 4.12.2Dual
- @opentelemetry/core 2.11.0CommonJS
- @eslint/eslintrc 3.3.7Dual