esbuild plugin that generates a JSON manifest file mapping entry points to their output assets (JS, CSS, images, etc.), similar to assets-webpack-plugin for Webpack. Version 1.0.8 is the latest stable release. It requires esbuild as a peer dependency, builds output based on esbuild's metafile, and supports custom filenames, output paths, metadata injection, and custom processing via processOutput. Key differentiators: lightweight, no extra runtime dependencies, focused solely on manifest generation, and fully typed with TypeScript definitions.
npm install esbuild-plugin-assets-manifestNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Builds an entry point and generates a manifest JSON file with custom metadata and indentation.
Use entryPoints: { app: './src/app.js' } instead of entryPoints: ['./src/app.js'].Add metafile: true to your esbuild build options.
Create the directory manually or use a plugin like esbuild-plugin-copy to ensure it exists.
Set publicPath: '/static/' (trailing slash) instead of '/static'.
If code splitting is used, additional processing may be needed; no built-in support.
Call the function directly without 'new': assetsManifest({...})Use default import: import assetsManifest from 'esbuild-plugin-assets-manifest'
Change entryPoints to an object: { app: './src/app.js' }