vite-size
v0.0.6
Published
Measure your build bundle size with Vite
Readme
Vite Size
Check the bundle size of the output build of any package with Vite.
Install
pnpm i vite-sizeCreate a script
In your package.json add the following script
"size": "npx tsc && vite-size"Externals
You can also add external packages so they are not bundled
"size": "npx tsc && vite-size --externals <package-name> <another-package-name>"--externals should always be the last flag in the script.
Run the script
pnpm run sizeLib mode
Use --lib if you're not using an index.html file.
"size": "npx tsc && vite-size --lib --externals <package-name> <another-package-name>"