glitch-txs / vite-size

Measure the bundle size of any package with Vite
9 stars 0 forks source link

Feature request: Add support for sveltekit projects. #1

Open matrs opened 1 week ago

matrs commented 1 week ago

Hi 👋🏻, I was looking for a way to measure the production's bundle size of a sveltekit project and i arrived here. Would it be possible to add support for sveltekit?

glitch-txs commented 1 week ago

hello, would you like to open a PR?

Would only require this https://github.com/glitch-txs/vite-size/blob/6ba0194a555b208a91e1501d532069b82fccac7c/package/index.ts#L48

For context this lib is meant to work with https://github.com/glitch-txs/vite-size-action

Also if you use Vite, it should already tell you your bundle size after running the build command.

matrs commented 4 days ago

Hey, thanks for answering. Im just starting with svelte, running the dev server and didn't pay attention to the build output the few times i've run it. For my case i probably will pipe the output from the build to awk so i can get a total. Anyways, i will try to make a pr when i have time, your vite size action looks useful too.