Visualize and analyze your esbuild bundle to see which modules are taking up space.
npm install --save-dev esbuild-visualizeror via yarn:
yarn add --dev esbuild-visualizerAdd script to package.json for example:
esbuild-visualizer --metadata ./meta.json --exclude *.png
--filename (string, default stats.html) - name of the file with diagram to generate
--title (string, default Esbuild Visualizer) - title tag value
--template (string, default treemap) - diagram type to use, could be sunburst, treemap, network
Generated html files do not and never will contain your source code (contents of files). They can contain only js/html/css code required to build chart (plugin code) and statistical information about your source code.
This statistical information can contain:
- size of files included in bundle
- size of files included in source map
- file's path
- files hierarchy (fs tree for your files)
See CHANGELOG.md.