canirequire › ESM-only › webpack-manifest-plugin
Is webpack-manifest-plugin ESM-only? Can you require() it?
A Webpack Plugin for generating Asset Manifests
Last verified Sep 9, 2026 against webpack-manifest-plugin@6.0.1. JSON
ESM-only ESM-only since 6.0.0 — last CommonJS version is 5.0.1
webpack-manifest-plugin dropped its CommonJS build in 6.0.0 (October 2025). The last version you can require() on every Node.js version, including 18 and older, is 5.0.1, published Mar 11, 2025.
On Node.js 20.19+, 22.12+ and every newer release, require("webpack-manifest-plugin") 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.
webpack-manifest-plugin@6.0.1 declares engines ">=20.19.0", so Node.js 18 is outside its supported range regardless of module format.
Does webpack-manifest-plugin@6.0.1 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("webpack-manifest-plugin") from a CommonJS file and import "webpack-manifest-plugin" from an ES module.
| Runtime | require("webpack-manifest-plugin") | import "webpack-manifest-plugin" |
|---|---|---|
| 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 webpack-manifest-plugin
ES modules (import)
import webpackManifestPlugin from "webpack-manifest-plugin";CommonJS (require)
// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const webpackManifestPlugin = require("webpack-manifest-plugin");
// Any Node.js version:
const webpackManifestPlugin = await import("webpack-manifest-plugin");
// Or pin the last CommonJS release:
// npm install webpack-manifest-plugin@5.0.1Module format by version
Derived from the type, main and exports fields of every stable release on npm (38 versions; the newest 38 shown).
| Versions | Format | First published |
|---|---|---|
| 6.0.0 – 6.0.1 | ESM-only | Oct 30, 2025 |
| 0.0.1 – 5.0.1 | CommonJS | May 6, 2015 |
Frequently asked
Is webpack-manifest-plugin ESM-only?
webpack-manifest-plugin@6.0.1 is ESM-only. webpack-manifest-plugin dropped its CommonJS build in 6.0.0 (October 2025). The last version you can require() on every Node.js version, including 18 and older, is 5.0.1, published Mar 11, 2025.
Which version of webpack-manifest-plugin still supports CommonJS / require()?
5.0.1 is the last version of webpack-manifest-plugin with a CommonJS build. Install it with "npm install webpack-manifest-plugin@5.0.1". Every version from 6.0.0 on is ESM-only.
How do I use webpack-manifest-plugin from a CommonJS file?
Use a dynamic import: const mod = await import("webpack-manifest-plugin"). On Node.js 20.19+, 22.12+ and newer, a plain require("webpack-manifest-plugin") also works for ESM packages that do not use top-level await. Alternatively pin webpack-manifest-plugin@5.0.1.
Does webpack-manifest-plugin work in Bun?
Yes. import "webpack-manifest-plugin" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does webpack-manifest-plugin ship TypeScript types?
Yes. webpack-manifest-plugin bundles its own type declarations; no @types package is needed.
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
- markdown-it-anchor 10.0.0CommonJS
- popper.js 1.16.1CommonJS
- vite-plugin-dts 5.1.0Dual
- pug 3.0.4CommonJS
- rollup-plugin-terser 7.0.2Dual
- ethers 6.17.0Dual
- vue-i18n 11.4.10Dual
- should 13.2.3CommonJS