vite-size
v0.0.5
Published
Measure your build bundle size with Vite
Downloads
117
Readme
Vite Size
Check the bundle size of the output build of any package with Vite.
Install
pnpm i vite-size
Create 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 size
Lib mode
Use --lib
if you're not using an index.html
file.
"size": "npx tsc && vite-size --lib --externals <package-name> <another-package-name>"