Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Track your library bundles size and its tree shakability with less effort. Supports vite.

License

Notifications You must be signed in to change notification settings

nejcm/rollup-plugin-size-snapshot-vite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-size-snapshot-vite

This plugin supports vite and provides details about

  • actual bundle size (bundler parsing size)
  • minified bundle size (browser parsing size)
  • gzipped bundle size (download size)

All of these sizes are important criteria when choosing a library, and they will be stored in the .size-snapshot.json file.

Usage

Inside vite.config:

import { sizeSnapshot } from '@nejcm/rollup-plugin-size-snapshot-vite';

export default defineConfig({
  build: {
    rollupOptions: {
      plugins: [sizeSnapshot()],
    },
  },
});

Note: If your config file is as .ts file than casting to any might be required. E.g.: sizeSnapshot() as any

License

MIT © Bogdan Chadkin

About

Track your library bundles size and its tree shakability with less effort. Supports vite.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 58.3%
  • JavaScript 41.7%