Socket
Book a DemoInstallSign in
Socket

vite-bundle-analyzer

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-bundle-analyzer

a modern vite bundle analyzer tool

latest
Source
npmnpm
Version
1.2.3
Version published
Weekly downloads
168K
-13.09%
Maintainers
1
Weekly downloads
 
Created

What is vite-bundle-analyzer?

The vite-bundle-analyzer is a plugin for Vite that helps developers analyze the size and composition of their JavaScript bundles. It provides a visual representation of the bundle contents, making it easier to identify large dependencies and optimize the build process.

What are vite-bundle-analyzer's main functionalities?

Bundle Visualization

This feature allows you to visualize your bundle in different formats such as treemap, sunburst, or network. The visualizer plugin generates an HTML file that opens automatically in your default browser, providing an interactive view of your bundle's composition.

import { defineConfig } from 'vite';
import { visualizer } from 'vite-bundle-analyzer';

export default defineConfig({
  plugins: [
    visualizer({
      open: true,
      filename: 'bundle-analysis.html',
      template: 'treemap' // or 'sunburst', 'network'
    })
  ]
});

Custom Report Generation

This feature allows you to generate a custom report that includes additional information such as gzip and brotli sizes. This can be useful for understanding the impact of compression on your bundle size.

import { defineConfig } from 'vite';
import { visualizer } from 'vite-bundle-analyzer';

export default defineConfig({
  plugins: [
    visualizer({
      open: true,
      filename: 'custom-report.html',
      gzipSize: true,
      brotliSize: true
    })
  ]
});

Other packages similar to vite-bundle-analyzer

Keywords

vite

FAQs

Package last updated on 29 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