A visualizer and analyzer for esbuild builds that generates an interactive HTML report from esbuild's metafile output. Version 0.2.0 is the current stable release; the package is maintained sporadically. It provides both a plugin API (for .build) and a standalone sync function (getEsbuildAnalyzerHtml) plus a CLI tool. Unlike webpack-bundle-analyzer, it is esbuild-native and does not require additional bundler integrations.
npm install esbuild-analyzerVerified import paths — ran on the pinned version, not inferred.
Shows how to use esbuild-analyzer as a plugin during esbuild's async build, generating an interactive HTML report.
Always set `metafile: true` in your esbuild build options.
Pass `plugins: [AnalyzerPlugin()]` to the esbuild build call.
Import the default export: `const AnalyzerPlugin = require('esbuild-analyzer');` or use `import AnalyzerPlugin from 'esbuild-analyzer'`.Use `require` or dynamic import. Or wrap in a CommonJS module.
First run `esbuild --metafile=meta.json` then `npx esbuild-analyzer --metafile=meta.json`.
Run `npm install -D esbuild-analyzer`.
Use `const AnalyzerPlugin = require('esbuild-analyzer')` (CommonJS) or `import AnalyzerPlugin from 'esbuild-analyzer'` (ESM not supported).Add `metafile: true` to your esbuild build configuration.