esbuild-progress
raw JSON → 1.0.1 verified Fri May 01 auth: no javascript
A simple esbuild plugin that displays a progress bar during builds. Current stable version is 1.0.1, released as a minor update. It integrates easily into any esbuild setup, providing visual feedback for long builds. Key differentiators: zero dependencies, lightweight, and minimal configuration.
Common errors
error TypeError: ProgressPlugin is not a constructor ↓
cause Using new ProgressPlugin() instead of ProgressPlugin().
fix
Remove 'new'. Call ProgressPlugin() directly.
error TypeError: (0 , _esbuildProgress.default) is not a function ↓
cause ESM import of named export which doesn't exist.
fix
Use default import: import ProgressPlugin from 'esbuild-progress'
error Module not found: Error: Can't resolve 'esbuild-progress' ↓
cause Missing npm install or incorrect import path.
fix
Run 'npm install esbuild-progress --save-dev' and verify import statement.
Warnings
gotcha Using require('esbuild-progress') returns an object with a default property. Must call .default or use ESM import. ↓
fix const ProgressPlugin = require('esbuild-progress').default;
gotcha The plugin is a factory function, not a class. Calling ProgressPlugin() returns a valid plugin object. ↓
fix Use ProgressPlugin() with parentheses.
gotcha The plugin does not work in browser environments; it uses Node.js stream/stderr. ↓
fix Only use in Node.js builds.
Install
npm install esbuild-progress yarn add esbuild-progress pnpm add esbuild-progress Imports
- ProgressPlugin wrong
const ProgressPlugin = require('esbuild-progress')correctimport ProgressPlugin from 'esbuild-progress' - ESM wrong
import { ProgressPlugin } from 'esbuild-progress'correctimport ProgressPlugin from 'esbuild-progress' - TypeScript
import ProgressPlugin from 'esbuild-progress'
Quickstart
const esbuild = require('esbuild');
const ProgressPlugin = require('esbuild-progress').default;
await esbuild.build({
entryPoints: ['src/index.js'],
outfile: 'dist/bundle.js',
plugins: [ProgressPlugin()],
});