Skip to content
Analyze the size and contents of your Ember app's bundles
HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
docs Add demo [skip ci] Sep 22, 2018
lib Catch errors during computation Nov 4, 2018
node-tests
tests Update to latest addon blueprint, drops support for node 6 Jun 1, 2019
.editorconfig
.ember-cli Initial Commit from Ember CLI v2.14.0 Jul 9, 2017
.eslintignore
.eslintrc.js Add Livereload support Sep 18, 2018
.gitignore Update to latest addon blueprint, drops support for node 6 Jun 1, 2019
.npmignore Update to latest addon blueprint, drops support for node 6 Jun 1, 2019
.template-lintrc.js
.travis.yml
.watchmanconfig Initial Commit from Ember CLI v2.14.0 Jul 9, 2017
CONTRIBUTING.md Update to latest addon blueprint, drops support for node 6 Jun 1, 2019
LICENSE.md Update to latest addon blueprint, drops support for node 6 Jun 1, 2019
README.md
ember-cli-build.js ember-cli-update 3.3 Aug 14, 2018
index.js Support TS based apps Jun 1, 2019
package.json v0.1.0 Jun 1, 2019
testem.js ember-cli-update 3.3 Aug 14, 2018
yarn.lock

README.md

ember-cli-bundle-analyzer

Build Status Ember Observer Score npm version

An Ember CLI addon to analyze the size and contents of your app's bundled output, using an interactive zoomable treemap.

View the interactive Demo

Screenshot of analyzer output

This helps you to

  • analyze which individual modules make it into your final bundle
  • find out how big each contained module is, including the raw source, minified and gzipped sizes
  • find modules that got there by mistake
  • optimize your bundle size

It uses broccoli-concat-analyser under the hood, which in turn was inspired by webpack-bundle-analyzer, and wraps it in Ember CLI addon to make it easy to use.

Compatibility

  • Ember CLI v2.13 or above
  • Node.js v8 or above

Installation

ember install ember-cli-bundle-analyzer

Usage

After you have started your development server using ember serve, this addon adds a custom middleware listening to /_analyze. So just open http://localhost:4200/_analyze in your web browser to access the analyzer output.

While it processes the data, which can take a while due to live minification and compression of all involved modules, a loading screen is displayed. After processing has finished you should see the final output.

Live reloading is supported, so whenever you change a project file the output will be re-computed and updated.

Options

You can customize the precessing by setting any of the following options into the 'bundle-analyzer' key of your ember-cli-build.js:

  • ignoreTestFiles (boolean): by default it will exclude all test files from the output. Set this to false to include them.

  • ignore (string | string[]): add files to ignore. Glob patterns are supported, e.g. *-fastboot.js.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

You can’t perform that action at this time.