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.

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'.
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.
npm install rollup-plugin-progress2
yarn add rollup-plugin-progress2
pnpm add rollup-plugin-progress2

Shows the minimum configuration to use rollup-plugin-progress2 with Rollup v3, including the import and plugin setup.

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
    })
  ]
});