Package Exports
- vite-plugin-total-bundle-size
Readme
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-sizeUsage
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 installLicense
This project is licensed under the ISC License.