Registry / devops / webpack-yam-plugin

webpack-yam-plugin

JSON →
library1.0.1jsnpmunverified

A Webpack plugin that generates a JSON manifest file mapping entry points to their output asset paths, with paths relative to a configurable root directory. Version 1.0.1 is the latest stable release; the project appears to be in maintenance mode with no recent updates since 2016. Key differentiators: relative path normalization for easier deployment, distinct status fields (building/built/errors) to reflect build state, and integration with a companion Python manifest reader.

npm install webpack-yam-plugin
INSTALL
IMPORT
SIG · WEBPACK-YAM-PLUGIN
W
webpack-yam-plugin
devopsjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

WebpackManifestPlugin
const WebpackManifestPlugin = require('webpack-yam-plugin');
import WebpackManifestPlugin from 'webpack-yam-plugin';
CommonJS required; package does not provide ES module exports.
WebpackManifestPlugin
const { WebpackManifestPlugin } = require('webpack-yam-plugin');
const { yamPlugin } = require('webpack-yam-plugin');
Plugin is exported as default; named import will fail.
default
const WebpackManifestPlugin = require('webpack-yam-plugin').default;
const WebpackManifestPlugin = require('webpack-yam-plugin').WebpackManifestPlugin;
Default export is accessed via .default in CommonJS.

Shows basic Webpack configuration with webpack-yam-plugin, including absolute manifestPath and outputRoot.

const path = require('path'); const webpack = require('webpack'); const WebpackManifestPlugin = require('webpack-yam-plugin'); const compiler = webpack({ entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: '[name].[chunkhash].js' }, plugins: [ new WebpackManifestPlugin({ manifestPath: path.resolve(__dirname, 'dist', 'manifest.json'), outputRoot: path.resolve(__dirname, 'dist') }) ] }); compiler.run((err, stats) => { if (err) { console.error(err); return; } console.log('Build complete. Manifest written to:', stats.compilation.assets['manifest.json'] ? 'yes' : 'no'); });
Debug
Known issues
deprecatedPackage has not been updated since 2016; may not work with Webpack 5 or later.
fix
Use a maintained alternative like webpack-manifest-plugin or assets-webpack-plugin.
affects: >=1.0.0
breakingPlugin requires absolute paths for manifestPath and outputRoot; relative paths will cause errors.
fix
Always pass absolute paths using path.resolve().
affects: >=1.0.0
gotchaManifest schema includes a 'building' status; reading the manifest before build completes may return incomplete data.
fix
Check manifest.status before using files; use 'built' status as ready indicator.
affects: >=1.0.0
gotchaThe plugin writes to manifestPath on each compilation; multiple compilations can overwrite the file.
fix
Ensure manifestPath is unique per compiler instance or use hook-based alternatives.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack-yam-plugin'
Missing npm install or incorrect module path.
fix
Run 'npm install webpack-yam-plugin' and ensure node_modules contains the package.
TypeError: WebpackManifestPlugin is not a constructor
Wrong import style causing undefined reference.
fix
Use correct CommonJS import: 'const WebpackManifestPlugin = require('webpack-yam-plugin');'
Error: The 'manifestPath' option must be an absolute path.
Passed a relative path to manifestPath.
fix
Use path.resolve() to convert relative path to absolute.
Error: Invalid status value 'building' in manifest.
Reading manifest before webpack compilation completes.
fix
Wait for compilation finished hook or check manifest.status === 'built'.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
webpack-yam-plugin — npm install webpack-yam-plugin · libregistry