Socket
Book a DemoInstallSign in
Socket

vite-bundle-explorer

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-bundle-explorer

Bundle analyzer and visualizer tool for Vite

0.2.2
latest
Source
npmnpm
Version published
Weekly downloads
88
-36.23%
Maintainers
1
Weekly downloads
 
Created
Source

vite-bundle-explorer

Bundle analyzer and visualizer tool for vite.

Current features:

  • Chunk size treemap
  • Module import graph
  • Build stats report
  • Detect duplicated dependencies

preview

How it works

vite-bundle-explorer consists of two main parts:

  • Vite Plugin: Gathers detailed build statistics in JSON format
  • CLI Utility: Serves a web interface for visualizing the data.

Usage

Install the package as a development dependency

npm install -D vite-bundle-explorer
# yarn add -D vite-bundle-explorer
# pnpm add -D vite-bundle-explorer

Next, add the statsPlugin to your vite config. This plugin will generate a stats.json file in your output directory on successful build, containing all bundle stats.

import { defineConfig } from 'vite';
import { statsPlugin } from 'vite-bundle-explorer/plugin';

export default defineConfig({
  plugins: [
    // ...other plugins
    statsPlugin(),
  ],
});

Once your build is complete and stats.json is generated, you can launch the web interface using the CLI utility:

npx vite-bundle-explorer ./dist/stats.json

Keywords

vite

FAQs

Package last updated on 15 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.