{"id":22155,"library":"rollup-plugin-output-manifest","title":"rollup-plugin-output-manifest","description":"Rollup plugin that generates a JSON manifest mapping source file names to their output filenames, inspired by webpack-manifest-plugin. Current stable version is 2.0.0, released with support for output assets and customizable key/value decoration. Key differentiators include flexible options for filtering, mapping, sorting bundles, and custom serialization. It is ESM-only with TypeScript type definitions. Suitable for Rollup builds requiring a manifest for asset references, unlike alternatives like @rollup/plugin-output which have different scoping.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/shuizhongyueming/rollup-plugin-output-manifest","tags":["javascript","rollup","output","manifest","json","asset","typescript"],"install":[{"cmd":"npm install rollup-plugin-output-manifest","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-output-manifest","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-output-manifest","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Module uses default export; named import will fail.","wrong":"import { outputManifest } from 'rollup-plugin-output-manifest'","symbol":"outputManifest","correct":"import outputManifest from 'rollup-plugin-output-manifest'"},{"note":"ESM-only package; require() is not supported. In CommonJS, use dynamic import().","wrong":"const outputManifest = require('rollup-plugin-output-manifest')","symbol":"outputManifest (default export)","correct":"import outputManifest from 'rollup-plugin-output-manifest'"},{"note":"TypeScript type exports are only available via isolated type import.","wrong":"import { OutputManifestOptions } from 'rollup-plugin-output-manifest'","symbol":"type OutputManifestOptions","correct":"import type { OutputManifestOptions } from 'rollup-plugin-output-manifest'"}],"quickstart":{"code":"import outputManifest from 'rollup-plugin-output-manifest';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'dist',\n    format: 'esm',\n  },\n  plugins: [\n    outputManifest({\n      fileName: 'manifest.json',\n      publicPath: '/assets/',\n      isMerge: false,\n    }),\n  ],\n};","lang":"typescript","description":"Shows basic setup of rollup-plugin-output-manifest with common options: custom filename, public path prefix, and merge behavior."},"warnings":[{"fix":"If you relied on exclusion of assets, provide a custom filter: outputManifest({ filter: bundle => bundle.type === 'chunk' })","message":"In v2.0.0, the default filter now includes OutputAsset by default. Previous behavior filtered only OutputChunk.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use default import: import outputManifest from 'rollup-plugin-output-manifest'","message":"In v2.0.0, default import is required. Named exports are not available.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure fileName option is unique or set isMerge to true to append entries.","message":"The plugin modifies Rollup's output hit map by writing manifest.json as an asset; conflicts if another plugin writes to same filename.","severity":"gotcha","affected_versions":"*"},{"fix":"Check your config: if you need keys without extension, set nameWithExt: false.","message":"Option nameWithExt default changed from false to true in a minor version; the README shows true as default but may be misleading.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Switch to ESM or use dynamic import: import('rollup-plugin-output-manifest').then(m => m.default()).","cause":"Using CommonJS require() instead of ESM import.","error":"SyntaxError: The requested module 'rollup-plugin-output-manifest' does not provide an export named 'default'"},{"fix":"Use import outputManifest from 'rollup-plugin-output-manifest' (without braces).","cause":"Named import instead of default import.","error":"TypeError: outputManifest is not a function"},{"fix":"Set fileName to a unique value or enable isMerge: true.","cause":"Two plugin instances with same fileName or conflict with another plugin.","error":"Error: The plugin 'output-manifest' tried to add a file that already exists: manifest.json"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}