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