vite-size
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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>"

Dependents (0)

Package Sidebar

Install

npm i vite-size

Weekly Downloads

83

Version

0.0.5

License

MIT

Unpacked Size

81.4 kB

Total Files

10

Last publish

Collaborators

  • glitch-txs