Skip to content

Instantly share code, notes, and snippets.

@wardpeet
Last active August 5, 2020 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wardpeet/3adcdffa833a24971716e193a56b7412 to your computer and use it in GitHub Desktop.
Save wardpeet/3adcdffa833a24971716e193a56b7412 to your computer and use it in GitHub Desktop.
Add Webpack Analyzer to gatsby
# Add Webpack Analyzer to gatsby
Get insights in your bundle by getting webpack stats into a file

Add Webpack Analyzer to gatsby

Get insights in your bundle by getting webpack stats into a file


Install necessary NPM package


Install the gatsby-plugin-webpack-bundle-analyser-v2 in gatsby-config.js

<GatsbyPlugin name="gatsby-plugin-webpack-bundle-analyser-v2" options={{analyzerMode: 'static', reportFilename: "_bundle.html", openAnalyzer: false }} />


Now you're ready to create your site

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