{"id":26945,"library":"esbuild-plugin-manifest","title":"esbuild-plugin-manifest","description":"ESBuild plugin that generates a manifest.json file mapping original asset names (e.g., index.js) to their hashed output filenames (e.g., index-4QTUNIID.js). Version 1.0.5, stable, supports custom hash formats, short names, extensionless keys, filtering, appending, and custom manifest generators. Designed for cache busting with ESBuild's built-in hashing. Ships TypeScript definitions. Peer dependency on esbuild ~0.","status":"active","version":"1.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/jfortunato/esbuild-plugin-manifest","tags":["javascript","esbuild","plugin","manifest","asset hash","cache bust","typescript"],"install":[{"cmd":"npm install esbuild-plugin-manifest","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-manifest","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-manifest","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a peer dependency to provide the plugin API.","package":"esbuild","optional":false}],"imports":[{"note":"Package exports a default export; CommonJS require works but TypeScript may need esModuleInterop.","wrong":"const manifestPlugin = require('esbuild-plugin-manifest')","symbol":"default","correct":"import manifestPlugin from 'esbuild-plugin-manifest'"},{"note":"Not a named export; use default import.","wrong":"import { manifestPlugin } from 'esbuild-plugin-manifest'","symbol":"manifestPlugin","correct":"import manifestPlugin from 'esbuild-plugin-manifest'"},{"note":"Exported as a type; import with 'import type' in TypeScript for correct usage.","wrong":"import { ManifestOptions } from 'esbuild-plugin-manifest'","symbol":"type ManifestOptions","correct":"import type { ManifestOptions } from 'esbuild-plugin-manifest'"}],"quickstart":{"code":"import esbuild from 'esbuild';\nimport manifestPlugin from 'esbuild-plugin-manifest';\n\nawait esbuild.build({\n  entryPoints: ['src/index.ts'],\n  bundle: true,\n  outdir: 'dist',\n  plugins: [manifestPlugin({\n    shortNames: true,\n    useEntrypointKeys: true,\n  })],\n});","lang":"javascript","description":"Shows default import, basic usage with esbuild, and common options shortNames and useEntrypointKeys."},"warnings":[{"fix":"Set shortNames: true in plugin options.","message":"Manifest keys include output directory path by default; use shortNames: true for basename-only.","severity":"gotcha","affected_versions":"<2.0"},{"fix":"Enable hashing in esbuild (e.g., entryNames: '[dir]/[name]-[hash]') or rely on plugin's default.","message":"If esbuild output hashes are disabled, the manifest will still map files but without unique hashes.","severity":"gotcha","affected_versions":">=0.0"},{"fix":"Set append: true in options.","message":"The manifest file overwrites by default; use append: true to merge with existing manifest.","severity":"gotcha","affected_versions":">=0.0"},{"fix":"N/A","message":"No deprecation warnings in current version.","severity":"deprecated","affected_versions":">=0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'import manifestPlugin from 'esbuild-plugin-manifest'' (default import).","cause":"Using named import instead of default import.","error":"TypeError: manifestPlugin is not a function"},{"fix":"Install both: npm install --save-dev esbuild esbuild-plugin-manifest","cause":"Package not installed or missing peer dependency esbuild.","error":"Error: Cannot find module 'esbuild-plugin-manifest'"},{"fix":"Set 'esModuleInterop': true in tsconfig.json.","cause":"Using default import in TypeScript without esModuleInterop.","error":"Type 'typeof import(...)' has no call signatures"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}