Registry / devops / html-progress-indicator-plugin

html-progress-indicator-plugin

JSON →
library0.4.0jsnpmunverified

A webpack plugin (v0.4.0) that displays build progress inside the browser page as a toast/nyan cat indicator, eliminating the need to watch terminal output. Requires html-webpack-plugin and webpack 5. Adds a script into the HTML to show progress during hot reloads. Ships TypeScript types. Peer deps: @types/webpack, html-webpack-plugin, webpack. Release cadence: sporadic, last release Nov 2022.

npm install html-progress-indicator-plugin
INSTALL
IMPORT
SIG · HTML-PROGRESS-INDI
H
html-progress-indicator-plugin
devopsjavascriptv0.4.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HtmlProgressIndicatorPlugin
✓ import { HtmlProgressIndicatorPlugin } from 'html-progress-indicator-plugin'
✗ const HtmlProgressIndicatorPlugin = require('html-progress-indicator-plugin')
ESM-only since v0.4.0? Package.json has no 'type':'module' but uses ESM syntax? Actually it uses CJS require in examples; but the import works if bundler supports ESM. The 'wrong' pattern is using default import (import X from '...') which doesn't exist.
MSG_ID
✓ import { MSG_ID } from 'html-progress-indicator-plugin'
Exported constant for custom template ID placeholder.
PROGRESS_ID
✓ import { PROGRESS_ID } from 'html-progress-indicator-plugin'
Exported constant for custom template ID placeholder.

Configures webpack with HtmlWebpackPlugin and HtmlProgressIndicatorPlugin, and adds the required placeholder comment in the HTML template.

// webpack.config.js const HtmlWebpackPlugin = require('html-webpack-plugin'); const { HtmlProgressIndicatorPlugin } = require('html-progress-indicator-plugin'); module.exports = { mode: 'development', entry: './src/index.js', output: { filename: 'bundle.js' }, plugins: [ new HtmlWebpackPlugin({ template: './src/index.html', }), new HtmlProgressIndicatorPlugin(), ], }; // src/index.html <!DOCTYPE html> <html> <head><title>My App</title></head> <body> <div id="app"></div> <!-- reload-indicator-placeholder --> </body> </html>
Debug
Known issues
gotchaPlugin must be added AFTER HtmlWebpackPlugin in the plugins array
fix
Ensure new HtmlProgressIndicatorPlugin() comes after new HtmlWebpackPlugin()
affects: >=0.1.0
gotchaPlaceholder comment <!-- reload-indicator-placeholder --> is required in HTML template
fix
Add <!-- reload-indicator-placeholder --> inside the <body> of your HTML template else the indicator won't appear
affects: >=0.1.0
deprecatedDefault placeholder may be removed in future versions; use custom placeholder
fix
Specify placeholder option explicitly
affects: >=0.3.0
gotchaOnly works with webpack 5 (peer dependency)
fix
Upgrade webpack to v5 or use an older version of the plugin
affects: >=0.4.0
gotchaRequires html-webpack-plugin v5
fix
Use html-webpack-plugin v5
affects: >=0.4.0
gotchaNode.js >=10 required
fix
Use Node.js 10 or later
affects: >=0.4.0
Errors
Common errors & fixes
Error: HtmlProgressIndicatorPlugin is not a constructor
Importing default instead of named export
fix
Use const { HtmlProgressIndicatorPlugin } = require('html-progress-indicator-plugin')
TypeError: Cannot read property 'hooks' of undefined
HtmlWebpackPlugin not added before HtmlProgressIndicatorPlugin
fix
Add new HtmlWebpackPlugin() before new HtmlProgressIndicatorPlugin() in plugins array
The progress indicator does not appear in the browser
Missing placeholder comment in HTML template
fix
Ensure <!-- reload-indicator-placeholder --> is inside the <body> tag of your HTML file
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
html-webpack-pluginrequiredrequired as peer dependency; plugin injects progress indicator into HTML generated by html-webpack-plugin
webpackrequiredpeer dependency; plugin is a webpack plugin
@types/webpackoptionaltype definitions for webpack; dev dependency for TypeScript projects
Agent activity
11 hits · last 30 days
node
10
Anthropic
1
Resources
html-progress-indicator-plugin — npm install html-progress-indicator-plugin · libregistry