Skip to content

Instantly share code, notes, and snippets.

@addyosmani
Last active August 20, 2017 11:07
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save addyosmani/2e8709e16e7cd3f1c7b24bcc90245002 to your computer and use it in GitHub Desktop.
Save addyosmani/2e8709e16e7cd3f1c7b24bcc90245002 to your computer and use it in GitHub Desktop.
Try out a developer preview of the Webpack Performance Insights RFC

RFC: webpack/webpack#3216

Try it today

The current POC is available in the following branch (huuuge thanks to Sean):

https://github.com/webpack/webpack/tree/feature/custom_stats

A demo app for trying it out on can be found here:

https://github.com/TheLarkInn/budgeting-sample-app-webpack2

You'll want to update the package.json to point to that version of Webpack. I would just use:

    "webpack": "git://github.com/webpack/webpack.git#feature/custom_stats",

Once you npm install to grab this version, you should be able to just run webpack and see the new output.

Configuration

If you'd like to configure the performance insights feature, this is supported using the performance object:

  performance: {
    maxAssetSize: 100,
    maxInitialChunkSize: 300,
    hints: true
  },

Caveat

Please note: this is a super early POC. The UX is not final at all and we welcome your feedback ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment