Registry / devops / parcel-plugin-bundle-visualiser

parcel-plugin-bundle-visualiser

JSON →
library1.2.0jsnpmunverified

parcel-plugin-bundle-visualiser is a plugin for the Parcel 1.x bundler that generates an interactive treemap visualization of your bundle contents. This allows developers to easily inspect asset sizes, identify large dependencies, and optimize their application's footprint. The plugin outputs an `report.html` file to the build directory when Parcel runs in production mode. Inspired by `webpack-bundle-analyzer`, it provides detailed insights into individual assets and bundles, including their minified sizes and estimated gzipped sizes. The package is currently at version 1.2.0, with its last update several years ago, primarily supporting Parcel 1.x. Given that Parcel 2.x has a built-in bundle analyzer, this plugin is effectively abandoned for newer Parcel versions and in maintenance mode for legacy Parcel 1.x projects.

npm install parcel-plugin-bundle-visualiser
INSTALL
IMPORT
SIG · PARCEL-PLUGIN-BUND
P
parcel-plugin-bundle-visualiser
devopsjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Installs the plugin and demonstrates how to trigger a bundle report generation using Parcel 1.x in production mode.

npm install --save-dev parcel-plugin-bundle-visualiser parcel-bundler # OR yarn add --dev parcel-plugin-bundle-visualiser parcel-bundler # Ensure Parcel knows about the plugin by adding it to package.json # (usually not strictly necessary for auto-discovery but good practice for clarity) { "name": "my-parcel-app", "version": "1.0.0", "main": "index.html", "devDependencies": { "parcel-bundler": "^1.x", "parcel-plugin-bundle-visualiser": "^1.x" }, "parcel-plugins": ["parcel-plugin-bundle-visualiser"] } # Run Parcel build in production mode # The report.html will be generated in your output directory (e.g., `dist/report.html`) NODE_ENV=production parcel build index.html
Debug
Known issues
breakingThe method for triggering report generation changed in version 1.0. Previously, it required a `--visualise` CLI argument. This was removed in 1.0.2 due to a bug. Since version 1.1.1, the report is only generated when `NODE_ENV` is set to `production`.
fix
Ensure `NODE_ENV=production` is set when running `parcel build`. Do not use the `--visualise` flag as it was removed.
affects: >=1.0.0 <1.1.1
breakingThis plugin is designed for Parcel 1.x (`parcel-bundler` package) and is incompatible with Parcel 2.x. Parcel 2.x has its own built-in bundle analyzer.
fix
For Parcel 2.x, use Parcel's built-in bundle analyzer by setting `PARCEL_BUNDLE_ANALYZER=1` or using the `--reporter @parcel/reporter-bundle-analyzer` flag during the build process. Do not attempt to use `parcel-plugin-bundle-visualiser` with Parcel 2.x.
affects: >=1.0.0
deprecatedThe underlying `parcel-bundler` package (Parcel 1.x) is deprecated and no longer actively maintained. This plugin will also not receive further updates or bug fixes.
fix
It is highly recommended to migrate to Parcel 2.x and use its native bundle analyzer for active development. For legacy Parcel 1.x projects, be aware that this plugin is unsupported.
affects: >=1.2.0
gotchaThe report file name is hardcoded to `report.html` and will overwrite previous reports in the output directory on subsequent builds.
fix
If you need to preserve reports, move or rename `report.html` before running a new production build.
affects: >=1.0.0
Errors
Common errors & fixes
report.html not found
The bundle report was not generated.
fix
Ensure that `NODE_ENV=production` is set when you run your Parcel build command. The plugin only generates the report in production mode. Verify the output directory for `report.html` is the one you expect.
error: unknown option '--visualise'
Using an outdated CLI argument to trigger the visualizer.
fix
Remove the `--visualise` argument from your Parcel build command. As of version 1.1.1, the plugin is triggered solely by `NODE_ENV=production`.
This package is abandoned? Incompatible with Parcel v2 ?
Attempting to use the Parcel 1.x plugin with Parcel 2.x.
fix
This plugin is strictly for Parcel 1.x. For Parcel 2.x, use the built-in bundle analyzer by setting the environment variable `PARCEL_BUNDLE_ANALYZER=1` or adding `--reporter @parcel/reporter-bundle-analyzer` to your `parcel build` command.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies
parcel-bundlerrequiredThis is a plugin for Parcel 1.x. It implicitly depends on `parcel-bundler` being installed and used as the primary bundler for the project. Parcel 1.x (`parcel-bundler` npm package) is deprecated and no longer maintained.
Agent activity
2 hits · last 30 days
node
2
Resources
parcel-plugin-bundle-visualiser — npm install parcel-plugin-bundle-visualiser · libregistry