VITE-BUNDLE-VISUALIZER(1)
NAME
vite-bundle-visualizer — CLI for visualizing your vite project bundle.
SYNOPSIS
INFO
450 stars
7 forks
0 views
JavaScriptDeveloper Tools
DESCRIPTION
CLI for visualizing your vite project bundle.
README
vite-bundle-visualizer
Visualize vite bundle, like webpack-bundle-analyzer.
A wrapper of rollup-plugin-visualizer.
In most scenarios you shouldn't need this library, the recommended solution is to add
rollup-plugin-visualizerdirectly to your vite configuration. However, if you are using vite, and want to run the visualizer directly from your command line via a CLI command instead without needing to build your site, now you have a solution with thevite-bundle-visualizer.(@wparad)
Usage
# In your vite project's root $ npx vite-bundle-visualizer # Then open stats.html in browserUse specified vite config file
$ npx vite-bundle-visualizer -c your.config.js
$ vite-bundle-visualizer --help
vite-bundle-visualizer
Usage:
$ vite-bundle-visualizer <command> [options]
Options:
-h, --help Display this message
--template -t <template> Template to use, options are "raw-data" (JSON), "treemap", "list", "sunburst" and "network" (default: treemap)
--output -o <filepath> Output file path, should be "**/*.html" or "**/*.json" (default: /var/folders/lb/9tn84c8x42nctvbs1fb3vxd40000gn/T/tmp-20782-nmqZuvXaZNxh/stats.html)
--open <open> Should open browser after generated, except when template is "json" (default: true)
--config -c <file> Use specified vite config file
--entry --input -i Use specified entry file, default is "index.html"
--sourcemap use sourcemap to calculate sizes of modules. By idea it will present more accurate results, defaults is false
--mode -m <mode> set env mode, defaults to production
Screenshots
Visualizer Templates
Treemap
$ vite-bundle-visualizer

Sunburst
$ vite-bundle-visualizer -t sunburst

Network
$ vite-bundle-visualizer -t network

Raw data
Output raw data (JSON) of stats
# @deprecated vite-bundle-visualizer -t json
$ vite-bundle-visualizer -t raw-data
List
Output yml file with all the data
$ vite-bundle-visualizer -t list
Dependencies
License
SEE ALSO
neovim(1)— Hyperextensible Vim-based text editor — the future of Vimtmux(1)— Terminal multiplexer — split panes, detach sessions, pair programhyperfine(1)— A command-line benchmarking tool — measure execution timestokei(1)— Count lines of code quickly — supports 150+ languagescftunnel(1)— 全协议内网穿透 CLI — Cloud 模式免费 HTTP/WS 穿透 + Relay 模式自建中继 TCP/UDP 全协议 | Cloudflare Tunnel + frp 双引擎
clihub3/4/2026VITE-BUNDLE-VISUALIZER(1)