{"id":27551,"library":"webpack-yam-plugin","title":"webpack-yam-plugin","description":"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.","status":"maintenance","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/markfinger/webpack-yam-plugin","tags":["javascript"],"install":[{"cmd":"npm install webpack-yam-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-yam-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-yam-plugin","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CommonJS required; package does not provide ES module exports.","wrong":"import WebpackManifestPlugin from 'webpack-yam-plugin';","symbol":"WebpackManifestPlugin","correct":"const WebpackManifestPlugin = require('webpack-yam-plugin');"},{"note":"Plugin is exported as default; named import will fail.","wrong":"const { yamPlugin } = require('webpack-yam-plugin');","symbol":"WebpackManifestPlugin","correct":"const { WebpackManifestPlugin } = require('webpack-yam-plugin');"},{"note":"Default export is accessed via .default in CommonJS.","wrong":"const WebpackManifestPlugin = require('webpack-yam-plugin').WebpackManifestPlugin;","symbol":"default","correct":"const WebpackManifestPlugin = require('webpack-yam-plugin').default;"}],"quickstart":{"code":"const path = require('path');\nconst webpack = require('webpack');\nconst WebpackManifestPlugin = require('webpack-yam-plugin');\n\nconst compiler = webpack({\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: '[name].[chunkhash].js'\n  },\n  plugins: [\n    new WebpackManifestPlugin({\n      manifestPath: path.resolve(__dirname, 'dist', 'manifest.json'),\n      outputRoot: path.resolve(__dirname, 'dist')\n    })\n  ]\n});\n\ncompiler.run((err, stats) => {\n  if (err) { console.error(err); return; }\n  console.log('Build complete. Manifest written to:', stats.compilation.assets['manifest.json'] ? 'yes' : 'no');\n});","lang":"javascript","description":"Shows basic Webpack configuration with webpack-yam-plugin, including absolute manifestPath and outputRoot."},"warnings":[{"fix":"Use a maintained alternative like webpack-manifest-plugin or assets-webpack-plugin.","message":"Package has not been updated since 2016; may not work with Webpack 5 or later.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always pass absolute paths using path.resolve().","message":"Plugin requires absolute paths for manifestPath and outputRoot; relative paths will cause errors.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Check manifest.status before using files; use 'built' status as ready indicator.","message":"Manifest schema includes a 'building' status; reading the manifest before build completes may return incomplete data.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure manifestPath is unique per compiler instance or use hook-based alternatives.","message":"The plugin writes to manifestPath on each compilation; multiple compilations can overwrite the file.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install webpack-yam-plugin' and ensure node_modules contains the package.","cause":"Missing npm install or incorrect module path.","error":"Error: Cannot find module 'webpack-yam-plugin'"},{"fix":"Use correct CommonJS import: 'const WebpackManifestPlugin = require('webpack-yam-plugin');'","cause":"Wrong import style causing undefined reference.","error":"TypeError: WebpackManifestPlugin is not a constructor"},{"fix":"Use path.resolve() to convert relative path to absolute.","cause":"Passed a relative path to manifestPath.","error":"Error: The 'manifestPath' option must be an absolute path."},{"fix":"Wait for compilation finished hook or check manifest.status === 'built'.","cause":"Reading manifest before webpack compilation completes.","error":"Error: Invalid status value 'building' in manifest."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}