canirequire › Dual (CommonJS + ESM) › @eslint-community/regexpp
Is @eslint-community/regexpp ESM-only? Can you require() it?
Regular expression parser for ECMAScript.
Last verified Sep 9, 2026 against @eslint-community/regexpp@4.12.2. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@eslint-community/regexpp publishes both a CommonJS entry and a native ESM entry (ESM added in 3.2.0). require("@eslint-community/regexpp") and import "@eslint-community/regexpp" both work on every supported Node.js version and in Bun.
Does @eslint-community/regexpp@4.12.2 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@eslint-community/regexpp") from a CommonJS file and import "@eslint-community/regexpp" from an ES module.
| Runtime | require("@eslint-community/regexpp") | import "@eslint-community/regexpp" |
|---|---|---|
| Node.js 18 | ✓ works | ✓ 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 @eslint-community/regexpp
ES modules (import)
import regexpp from "@eslint-community/regexpp";CommonJS (require)
const regexpp = require("@eslint-community/regexpp");Module format by version
Derived from the type, main and exports fields of every stable release on npm (27 versions; the newest 27 shown).
| Versions | Format | First published |
|---|---|---|
| 3.2.0 – 4.12.2 | Dual (CommonJS + ESM) | Nov 28, 2022 |
Frequently asked
Is @eslint-community/regexpp ESM-only?
@eslint-community/regexpp@4.12.2 ships CommonJS and ESM builds. @eslint-community/regexpp publishes both a CommonJS entry and a native ESM entry (ESM added in 3.2.0). require("@eslint-community/regexpp") and import "@eslint-community/regexpp" both work on every supported Node.js version and in Bun.
Can I require @eslint-community/regexpp?
Yes. @eslint-community/regexpp ships a CommonJS entry, so require("@eslint-community/regexpp") works on every Node.js version, alongside the native ESM entry for import.
Does @eslint-community/regexpp work in Bun?
Yes. import "@eslint-community/regexpp" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @eslint-community/regexpp ship TypeScript types?
Yes. @eslint-community/regexpp bundles its own type declarations; no @types package is needed.
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- @smithy/util-utf8 4.5.2CommonJS
- @babel/helper-validator-option 8.0.0ESM-only
- @rolldown/pluginutils 1.0.1ESM-only
- @eslint/js 10.0.1CommonJS
- @opentelemetry/core 2.11.0CommonJS
- @eslint/eslintrc 3.3.7Dual
- @smithy/is-array-buffer 4.5.2CommonJS
- @typescript-eslint/types 8.70.0CommonJS