Skip to content

VanyaMate/vite-plugin-bundle-monitoring

Repository files navigation

vite-plugin-bundle-monitoring

npm i -D vite-plugin-bundle-monitoring

Plugin for vite to monitor changes in bundle size.

Executed after the build is complete and compares the current files with the previous ones. img.png

Get start

To use, you just need to add it to plugins in Vite config

import VitePluginBundleMonitoring from 'vite-plugin-bundle-monitoring';


export default defineConfig({
    plugins: [
        VitePluginBundleMonitoring({
            compareFileDir: path.resolve(__dirname, 'compare'),
        }),
    ],
})

If you want the size to be calculated from new data, simply delete or move the old data to another location.

PluginOptions

type VitePluginBundleMonitoringOptions = {
    compareFileDir?: string;   // default: __dirname
    compareFileName?: string;  // default: vite-bundle-monitoring.compare.json
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published