Registry / devops / esbuild-plugin-manifest

esbuild-plugin-manifest

JSON →
library1.0.5jsnpmunverified

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.

npm install esbuild-plugin-manifest
INSTALL
IMPORT
SIG · ESBUILD-PLUGIN-MAN
E
esbuild-plugin-manifest
devopsjavascriptv1.0.5
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.

default
import manifestPlugin from 'esbuild-plugin-manifest'
const manifestPlugin = require('esbuild-plugin-manifest')
Package exports a default export; CommonJS require works but TypeScript may need esModuleInterop.
manifestPlugin
import manifestPlugin from 'esbuild-plugin-manifest'
import { manifestPlugin } from 'esbuild-plugin-manifest'
Not a named export; use default import.
type ManifestOptions
import type { ManifestOptions } from 'esbuild-plugin-manifest'
import { ManifestOptions } from 'esbuild-plugin-manifest'
Exported as a type; import with 'import type' in TypeScript for correct usage.

Shows default import, basic usage with esbuild, and common options shortNames and useEntrypointKeys.

import esbuild from 'esbuild'; import manifestPlugin from 'esbuild-plugin-manifest'; await esbuild.build({ entryPoints: ['src/index.ts'], bundle: true, outdir: 'dist', plugins: [manifestPlugin({ shortNames: true, useEntrypointKeys: true, })], });
Debug
Known issues
gotchaManifest keys include output directory path by default; use shortNames: true for basename-only.
fix
Set shortNames: true in plugin options.
affects: <2.0
gotchaIf esbuild output hashes are disabled, the manifest will still map files but without unique hashes.
fix
Enable hashing in esbuild (e.g., entryNames: '[dir]/[name]-[hash]') or rely on plugin's default.
affects: >=0.0
gotchaThe manifest file overwrites by default; use append: true to merge with existing manifest.
fix
Set append: true in options.
affects: >=0.0
deprecatedNo deprecation warnings in current version.
fix
N/A
affects: >=0.0
Errors
Common errors & fixes
TypeError: manifestPlugin is not a function
Using named import instead of default import.
fix
Use 'import manifestPlugin from 'esbuild-plugin-manifest'' (default import).
Error: Cannot find module 'esbuild-plugin-manifest'
Package not installed or missing peer dependency esbuild.
fix
Install both: npm install --save-dev esbuild esbuild-plugin-manifest
Type 'typeof import(...)' has no call signatures
Using default import in TypeScript without esModuleInterop.
fix
Set 'esModuleInterop': true in tsconfig.json.
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies
esbuildrequiredRequired as a peer dependency to provide the plugin API.
Agent activity
2 hits · last 30 days
node
2
Resources
esbuild-plugin-manifest — npm install esbuild-plugin-manifest · libregistry