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

Latest commit

 

History

History
33 lines (22 loc) · 783 Bytes

File metadata and controls

33 lines (22 loc) · 783 Bytes

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