I know there is webpack-bundle-size-analyzer for visualizing and analyzing bundle sizes with webpack projects but how do I integrate it (or something similar) to SPFx web part or SPFx extension project made with Yeoman generator?

Is there some gulp task example available?

1 Answer 1


The .sppkg file packaged by the SPFx app (through build, bundle and package-solution gulp commands) is actually a simple archive you can unzip.

Its content can be broken down pretty easily (xml and resource files).

One thing you can also is configure a CDN in your project, so that packaging creates the .sppkg without any web resource (JS files, images and fonts) and puts them in a separate folder for you to upload to the location of your choice.

If the objective is to analyse the actual content of the compiled JS resources, I am not able to help you unfortunately.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.