Migrated a dashboard application from React to Svelte
Migrated a dashboard application from React to Svelte
I've migrated an (internal) dashboard application from TanStack Start + React + React Query to Svelte + SvelteKit.
Functionality is exactly the same as before. We have pretty good end to end tests, plus lots of internal users and no major issues have been reported after 2 days of use.
The migration was done using Codex + GPT 5.5 high, using all the Svelte AI tools (mcp, agents.md, etc) to ensure best practices were followed at all times, etc.
The result: I'M F*NG IMPRESSED!
Source code was reduced to 60% of what it was before. The code is also a lot easier to read and understand. Performance is probably a lot better too, but we hadn't any performance issue before anyways, so it's not a selling point for this project.
Here's the build output:
| Metric | React baseline | SvelteKit branch | Change |
| --- | ---: | ---: | ---: |
| Runtime public assets, excluding React bundle-stats.html | 530.5 KiB raw / 161.4 KiB gzip | 272.3 KiB raw / 85.1 KiB gzip | -258.2 KiB raw (-48.7%) / -76.3 KiB gzip (-47.3%) |
| JS assets | 441.6 KiB raw / 145.9 KiB gzip | 175.9 KiB raw / 68.7 KiB gzip | -265.7 KiB raw (-60.2%) / -77.2 KiB gzip (-52.9%) |
| CSS assets | 88.9 KiB raw / 15.5 KiB gzip | 88.8 KiB raw / 15.3 KiB gzip | effectively unchanged |
| Full public output, including React bundle-stats.html | 978.6 KiB raw / 289.6 KiB gzip | 272.3 KiB raw / 85.1 KiB gzip | -706.3 KiB raw (-72.2%) / -204.5 KiB gzip (-70.6%) |
Notes:
- The largest React client JS chunk is
assets/index-jX_vibbX.jsat 377.1 KiB raw / 120.3 KiB gzip. - The largest SvelteKit JS chunks are 48.3 KiB raw / 18.3 KiB gzip and 41.2 KiB raw / 15.1 KiB gzip.
- CSS size is nearly identical because the shared Tailwind/DaisyUI styling dominates that part of the build.
Hi I'm new to svelte and have been building a personal project using svelte kit, and in my case the files are managble but the size of my codebase is bigger than some of the other react projects I have worked can you please show me or tell me good file and folder structure for svelte.
Maybe think about the reusability of your components
Power of svelte right there.
And how was the benchmark of the pages? Still good, any improvement?
Same for me, migration is so smooth
You got rid of tanstack query at all? Didn’t migrate to svelte adapter? If yes, why?
Svelte remote functions queries were enough for what we needed.
Nothing against TS query. One of the best libraries out there and we still use it for all of our react projects.
I’m building a dashboard application for Enterprise using ag grid and echarts for visualisations. So far it’s looking promising.
Oooh... Are you using AG Grid or AG Studio (the dashboarding framework)?
Just AG Grid, the dashboarding isn’t useful to us in particular as users don’t want to customise the visualisations in anyway, just view them.
Svelte is a beast! Good job
Does anyone know good opensource svelete tailwind dashboard template?
which router do you use with svelte?
It’s in the post. Sveltekit.