Socket
Book a DemoInstallSign in
Socket

vite-plugin-total-bundle-size

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-total-bundle-size

Vite plugin that outputs the total size of the bundle

latest
Source
npmnpm
Version
1.0.8
Version published
Weekly downloads
380
90.95%
Maintainers
0
Weekly downloads
 
Created
Source

Vite Plugin Total Bundle Size

This readme was generated by GPT-4

Features

  • Calculates total bundle size after Vite build
  • Displays bundle size in the console

Installation

To install the plugin, run the following command in your project directory:

npm i -D vite-plugin-total-bundle-size

Usage

To use the plugin, import it into your vite.config.js or vite.config.ts file and add it to the plugins array:

import { totalBundleSize } from 'vite-plugin-total-bundle-size';
export default {
  plugins: [totalBundleSize()],
};

or with options:

import { totalBundleSize } from 'vite-plugin-total-bundle-size';
export default {
  plugins: [
    totalBundleSize({
      fileNameRegex: /\.(js|css)$/,
      printFileStats: true,
      calculateGzip: false,
    }),
  ],
};

Development

To contribute to the development of this plugin, ensure you have the following tools installed:

  • Node.js (version 16 or higher)

Clone the repository, install dependencies, and start making your changes:

git clone https://github.com/your-username/vite-plugin-total-bundle-size.git
cd vite-plugin-total-bundle-size
npm install

License

This project is licensed under the ISC License.

Keywords

vite

FAQs

Package last updated on 28 Jul 2024

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