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. Markdown · 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 with a plain require()-able CommonJS entry is 5.0.1, published Mar 11, 2025; it declares support for Node.js >=14.
On Node.js 20.19+, 22.12+ and newer, require("webpack-manifest-plugin") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 20, 22, 24 and 26. Node.js 18 has no require(esm), and webpack-manifest-plugin@6.0.1 declares Node.js >=20.19.0, so 18 is outside its supported range anyway.
webpack-manifest-plugin@6.0.1 declares engines ">=20.19.0", so Node.js 18 is outside its supported range regardless of module format.
What to do
- On Node.js 20.19+, 22.12+ and newer, require("webpack-manifest-plugin") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 20, 22, 24 and 26.
- From a CommonJS file, use a dynamic import inside an async function: const webpackManifestPlugin = await import("webpack-manifest-plugin"). That works on every Node.js version the package supports (>=20.19.0).
- If you need a synchronous require() or run Node.js 18: npm install webpack-manifest-plugin@5.0.1, the last CommonJS release (published Mar 11, 2025); it declares Node.js >=14.
- webpack-manifest-plugin@6.0.1 declares engines ">=20.19.0", so Node.js 18 is unsupported regardless: upgrade Node.js or pin an older release.
- TypeScript: types are bundled; install nothing extra.
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.0 | ✓ works | ✓ works |
How to import webpack-manifest-plugin
ES modules (import)
import * as webpackManifestPlugin from "webpack-manifest-plugin";Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.
CommonJS (require)
// Node.js 20.19+, 22.12+ and newer (verified):
const webpackManifestPlugin = require("webpack-manifest-plugin");
// Any Node.js version the package supports (>=20.19.0), from an async function:
async function main() {
const webpackManifestPlugin = await import("webpack-manifest-plugin");
}
// Or pin the last CommonJS release (declares Node.js >=14):
// 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, corrected where a runtime test of that version contradicted them (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 with a plain require()-able CommonJS entry is 5.0.1, published Mar 11, 2025; it declares support for Node.js >=14.
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; it declares Node.js >=14. 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?
From a CommonJS file, use a dynamic import inside an async function: const webpackManifestPlugin = await import("webpack-manifest-plugin"). That works on every Node.js version the package supports (>=20.19.0). On Node.js 20.19+, 22.12+ and newer, require("webpack-manifest-plugin") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 20, 22, 24 and 26. Alternatively pin webpack-manifest-plugin@5.0.1 (declares Node.js >=14).
Does webpack-manifest-plugin work in Bun?
Yes. import "webpack-manifest-plugin" loaded successfully in Bun 1.4.0 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 - string-width 8.2.2last CJS
4.2.3 - ansi-regex 6.3.0last CJS
5.0.1 - escape-string-regexp 5.0.0last CJS
4.0.0
Similar popularity
- @babel/cli 8.0.4No entry
- vite-plugin-dts 5.1.0Dual
- pug 3.0.4CommonJS
- @changesets/cli 3.0.2ESM-only
- rollup-plugin-terser 7.0.2Dual
- ethers 6.17.0Dual
- vue-i18n 11.4.10Dual
- @babel/plugin-proposal-export-namespace-from 7.18.9CommonJS