canirequire › CommonJS › dumi
Is dumi ESM-only? Can you require() it?
📖 Documentation Generator of React Component
Latest version 2.4.49, published Aug 12, 2026. JSON
CommonJS CommonJS — require() works on every Node.js version
dumi ships CommonJS only. require("dumi") works everywhere. import "dumi" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.
Does dumi@2.4.49 actually load? Runtime test results
Runtime probe pending for this version. The values below are what package.json declares; they are refreshed once the probe runs.
| Runtime | require("dumi") | import "dumi" |
|---|---|---|
| Node.js 18 | ✓ expected | ✓ expected |
| Node.js 20 | ✓ expected | ✓ expected |
| Node.js 22 | ✓ expected | ✓ expected |
| Node.js 24 | ✓ expected | ✓ expected |
| Node.js 26 | ✓ expected | ✓ expected |
| Bun 1.4 | pending | pending |
Install failed in our sandbox: PROBE_TIMEOUT The rows above show what package.json declares.
How to import dumi
ES modules (import)
import dumi from "dumi";Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.
CommonJS (require)
const dumi = require("dumi");Module format by version
Derived from the type, main and exports fields of every stable release on npm (214 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 2.2.15 – 2.4.49 | CommonJS | Dec 11, 2023 |
Frequently asked
Is dumi ESM-only?
dumi@2.4.49 is a CommonJS package. dumi ships CommonJS only. require("dumi") works everywhere. import "dumi" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.
Can I import dumi with ES module syntax?
Yes. import dumi from "dumi" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.
Does dumi ship TypeScript types?
Yes. dumi bundles its own type declarations; no @types package is needed.
Links
Other commonjs packages
- debug 4.4.3CommonJS
- semver 7.8.5CommonJS
- ms 2.1.3CommonJS
- picomatch 4.0.7CommonJS
- ajv 8.20.0CommonJS
- source-map 0.8.0CommonJS
- react-is 19.2.8CommonJS
- readable-stream 4.7.0CommonJS
Similar popularity
- gulp-minify-css 1.2.4CommonJS
- tsdx 2.0.0ESM-only
- jasmine-node 3.0.0CommonJS
- karma-browserify 8.1.0CommonJS
- babel-preset-latest 6.24.1CommonJS
- nodeunit 0.11.3CommonJS
- yeoman-assert 3.1.1CommonJS
- ember-cli-qunit 4.4.0CommonJS