rollup-plugin-progress2
raw JSON → 0.2.3 verified Mon Apr 27 auth: no javascript
A Rollup plugin that displays the current module being transpiled during the bundling process. Version 0.2.3 rewrites the original rollup-plugin-progress in TypeScript and adds support for Rollup v3. It provides a simple progress indicator with an optional clearLine configuration. Unlike the original, this version is maintained, typed, and compatible with Rollup v3. Released as a scoped replacement, it has a low release cadence and minimal dependencies.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module not supported. ↓
cause Trying to use require() on an ESM-only package.
fix
Use import instead, or set { "type": "module" } in package.json.
error TypeError: progress is not a function ↓
cause Using named import instead of default import.
fix
Use import progress from 'rollup-plugin-progress2'.
Warnings
gotcha Setting clearLine to false will leave the progress line visible after bundling, which can clutter the terminal output. ↓
fix Set clearLine: true (default) to clear the progress line after each module.
gotcha The plugin only supports Rollup v3, not v2 or v4. Use with Rollup v2 will fail silently or cause errors. ↓
fix Ensure Rollup version is 3.x.
deprecated The original rollup-plugin-progress is deprecated and unmaintained. This fork replaces it. ↓
fix Use rollup-plugin-progress2 instead.
Install
npm install rollup-plugin-progress2 yarn add rollup-plugin-progress2 pnpm add rollup-plugin-progress2 Imports
- default wrong
const progress = require('rollup-plugin-progress2')correctimport progress from 'rollup-plugin-progress2' - progress wrong
import { progress } from 'rollup-plugin-progress2'correctimport progress from 'rollup-plugin-progress2' - Plugin wrong
import { Plugin } from 'rollup-plugin-progress2'correctimport type { Plugin } from 'rollup'
Quickstart
import { defineConfig } from 'rollup';
import progress from 'rollup-plugin-progress2';
export default defineConfig({
input: 'src/index.js',
output: {
dir: 'dist',
format: 'es'
},
plugins: [
progress({
clearLine: true
})
]
});