🏭 Production

How Parcel helps you optimizing your project for production

TODO

ΒΆ Inspecting bundle size

Parcel has builtin plugins for a few tools to help with analyzing bundle size.

ΒΆ Bundle Analyzer

To generate a HTML file for every bundle, set the PARCEL_BUNDLE_ANALYZER environment variable.

PARCEL_BUNDLE_ANALYZER=1 parcel build src/index.html

This generates a folder parcel-bundle-reports in your project root with an HTML file for every target:

A screenshot of the bundle analyzer output

ΒΆ Bundle Buddy

Set the BUNDLE_BUDDY environment variable

BUNDLE_BUDDY=1 parcel build src/index.html

and use the files (in the dist directory) on the Bundle Buddy website.

A screenshot of the Bundle Buddy website with a loaded project