Registry / devops / webpack-assets-manifest

webpack-assets-manifest

JSON →
library6.5.1jsnpmunverified

Webpack plugin that generates a JSON manifest mapping original filenames to their hashed output (e.g., main.js → main-9c68d5e8.js). v6.5.1 is the latest stable release, with frequent updates (~monthly). Written in TypeScript, ships its own types. Supports Subresource Integrity (SRI), entrypoint assets, custom sorting, merging, and hooks. A key differentiator is its built-in SRI and entrypoint handling, plus full webpack 5 compatibility. Requires Node >=20.10 and webpack ^5.61. No default export in v6 — use named import.

npm install webpack-assets-manifest
INSTALL
IMPORT
SIG · WEBPACK-ASSETS-MAN
W
webpack-assets-manifest
devopsjavascriptv6.5.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebpackAssetsManifest
import { WebpackAssetsManifest } from 'webpack-assets-manifest'
const WebpackAssetsManifest = require('webpack-assets-manifest'); // or: import WebpackAssetsManifest from 'webpack-assets-manifest'
Since v6, the plugin is a named export, not default. CommonJS users must destructure from module.exports.
WebpackAssetsManifest (CommonJS)
const { WebpackAssetsManifest } = require('webpack-assets-manifest')
const WebpackAssetsManifest = require('webpack-assets-manifest').default
The default export is removed in v6. Do NOT use .default.
Options type
import type { Options } from 'webpack-assets-manifest'
import { Options } from 'webpack-assets-manifest' (if not using type-only)
Options is a TypeScript type, not a runtime value. Use type-only import to avoid bundling.

Creates a manifest with integrity and entrypoints, filters out .map files, then accesses entries and SRI hashes after build.

import { WebpackAssetsManifest } from 'webpack-assets-manifest'; const manifestPlugin = new WebpackAssetsManifest({ output: 'my-assets.json', entrypoints: true, integrity: true, customize(entry, original, utils) { if (entry.value && entry.value.match(/\.map$/)) return false; // exclude sourcemaps return entry; } }); // In webpack config: export default { plugins: [manifestPlugin] }; // Access manifest after build: console.log(manifestPlugin.get('main.js')); console.log(manifestPlugin.getIntegrity('main.js'));
Debug
Known issues
breakingv6 removed default export; import must use named export `WebpackAssetsManifest`
fix
Change `import WebpackAssetsManifest from 'webpack-assets-manifest'` to `import { WebpackAssetsManifest } from 'webpack-assets-manifest'`
affects: >=6.0.0
breakingv5 changed default output filename to 'assets-manifest.json' (was 'manifest.json')
fix
Set `output: 'manifest.json'` explicitly to retain old behavior or update downstream consumers.
affects: >=5.0.0 <6.0.0
deprecatedv4 entrypoints structure changed: assets now nested under `assets` property (e.g., `entrypoints.main.assets.js` instead of `entrypoints.main.js`)
fix
Update code that reads entrypoints to use the new nested structure.
affects: >=4.0.0 <5.0.0
gotchaOptions schema in v5+ does not allow extra properties; typos in option names will throw validation errors
fix
Ensure all option names match the documented schema exactly.
affects: >=5.0.0
gotchaSRI hash generation may produce different hashes than Webpack's built-in SRI plugin due to different hash splitting logic (v6.0.2+)
fix
Use consistent hashing algorithm; if exact match needed, consider using webpack's Subresource Integrity plugin directly.
affects: >=6.0.2
Errors
Common errors & fixes
TypeError: WebpackAssetsManifest is not a constructor
Using default import in v6 when only named export exists
fix
import { WebpackAssetsManifest } from 'webpack-assets-manifest'
Cannot find module 'webpack-assets-manifest'
Package not installed or Node.js version below 20.10 (v6 requires >=20.10)
fix
Install with `npm install -D webpack-assets-manifest` and ensure Node >=20.10
ValidationError: Invalid options object. 'WebpackAssetsManifest' has an unknown property 'entrypointsUseAssets'
Option name typo or used in v5+ (property renamed or removed)
fix
Check valid option names in the schema; use 'entrypointsUseAssets' only for v4, for v5+ use 'entrypoints: true'
Upgrade
Version history
6.5.1latest on npm
Audit
Dependencies
webpackrequiredPeer dependency; plugin hooks into webpack compilation lifecycle
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
webpack-assets-manifest — npm install webpack-assets-manifest · libregistry