parcel-plugin-bundle-visualiser icon indicating copy to clipboard operation
parcel-plugin-bundle-visualiser copied to clipboard

Incompatible with Parcel v2 ?

Open rondonjon opened this issue 4 years ago • 8 comments

It seems that this plugin no longer works after upgrading to the new Parcel v2; the report.html file is no longer generated.

rondonjon avatar May 25 '20 14:05 rondonjon

There is a Parcel 2 core plugin that is included by default and can be enabled by setting an env-variable: ~PARCEL_BUNDLE_ANALZYZER=1 parcel build ...~ PARCEL_BUNDLE_ANALYZER =1 parcel build ...

(https://github.com/parcel-bundler/parcel/tree/v2/packages/reporters/bundle-analyzer)

mischnic avatar May 25 '20 14:05 mischnic

This doesn't seem to output anything for some reason, can't find any documentation for it either.

YassienW avatar Aug 04 '20 12:08 YassienW

https://v2.parceljs.org/features/production/

mischnic avatar Aug 04 '20 12:08 mischnic

fwiw there's a typo in the above command if anyone missed that as i did

PARCEL_BUNDLE_ANALYZER=1 parcel build

sbauch avatar Oct 30 '20 13:10 sbauch

For anyone encountering this with the latest Parcel 2 beta versions (or newer), the new way to call the built-in Parcel 2 Bundle Analyzer is:

parcel build src/index.html --reporter @parcel/reporter-bundle-analyzer


PARCEL_BUNDLE_ANALYZER=1 also needs to be set, so consider:

cross-env PARCEL_BUNDLE_ANALYZER=1 parcel build src/index.html --reporter @parcel/reporter-bundle-analyzer

(as seen in the docs at https://v2.parceljs.org/features/production/)

dannya avatar Jun 08 '21 16:06 dannya

After upgrading to latest parcel version, I get: The plugin "@parcel/reporter-bundle-analyzer" is not compatible with the current version of Parcel. Requires "^2.8.3" but the current version is "2.0.0-nightly.1293

My versions:

"@parcel/reporter-bundle-analyzer": "^2.8.3", "parcel": "^2.0.0-nightly.1293",

Shouldn't it work anyway?

Cristy94 avatar May 11 '23 13:05 Cristy94

@parcel/reporter-bundle-analyzer is not this repo, it's an official plugin: https://github.com/parcel-bundler/parcel/tree/v2/packages/reporters/bundle-analyzer And this is unfortunately what the semver rules are: https://jubianchi.github.io/semver-check/#/^2.8.3/2.0.0-nightly.1293 You should instead install the nightly for both: yarn add parcel@nightly @parcel/reporter-bundle-analyzer@nightly

mischnic avatar May 11 '23 14:05 mischnic

Thanks, it worked!

Oh, sorry, I didn't realize it's a different repo, got here by Googling the error.

Cristy94 avatar May 11 '23 15:05 Cristy94