canirequire

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

  1. 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.
  2. 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).
  3. 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.
  4. 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.
  5. TypeScript: types are bundled; install nothing extra.
Latest
6.0.1 (Nov 2, 2025)
Module format
ESM-only
Last CommonJS version
5.0.1
ESM-only since
6.0.0 (Oct 30, 2025)
TypeScript types
Bundled
Node engines
>=20.19.0
Weekly downloads
3.4M
License
MIT

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.

Runtimerequire("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.1

Module 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).

VersionsFormatFirst published
6.0.0 – 6.0.1ESM-onlyOct 30, 2025
0.0.1 – 5.0.1CommonJSMay 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

Similar popularity