vite-plugin-total-bundle-size
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

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.

Package Sidebar

Install

npm i vite-plugin-total-bundle-size

Weekly Downloads

34

Version

1.0.8

License

ISC

Unpacked Size

10.6 kB

Total Files

6

Last publish

Collaborators

  • alexeychikk