DEV Community

Discussion on: Create a React component library with Vite and Typescript

Collapse
 
neolivz profile image
Jishnu Viswanath

After considerable amount of time spent on migrating component library build from rollup to vite I realised that vite build is slower than rollup

All timing values are taken from vite-plugin-time-reporter plugin for both vite and rollup

First vite report
dev-to-uploads.s3.amazonaws.com/up...

On update with watch
dev-to-uploads.s3.amazonaws.com/up...

With rollup
dev-to-uploads.s3.amazonaws.com/up...

It looks like vite is good for only single page webapp build not for component library on mono repo

Collapse
 
nicolaserny profile image
Nicolas Erny

Thank you for your feedback. I don't have much experience with rollup. But it's good to know that rollup can be a more performant choice. On my projets, I'm happy with performance, but I don't have any comparison with rollup...
I wonder if there is a bug in vite. I will check out the issues on Github.