Hacker News new | past | comments | ask | show | jobs | submit login

It started as a fork of expo router to test if we could get it to work on Vite. Over time we did diverge a few things and added other features.

It’s actually fully Vite on native. We wrote an entire custom bundling step and hot reloading. This was no small feat, quite hard. That was the motivation though - simple tooling and the same bundler for everything.

Expo is great for Expo Go and EAS. It’s a good complement!




From my limited understanding of Vite, it serves es modules directly on the fly during dev but uses Rollup to bundle in production. Did you swap out Rollup for Metro in production, or have you somehow ported all that byte code generation stuff to Rollup as well? Pretty wild either way!


We use Rollup to build for native, SWC so we can compile class away (RN doesn't support classes, shockingly).

Then we actually build out our own custom bundle using the Rollup output because we need to hot reload it, so we built our own little hot reload pipeline on top of Vite. It's not too complex actually - websocket, listen to vite, transpile it to CJS/ES5, analyze and re-write imports to match bundle, and then send it over.

But yea, it was a lot of work. Going to have to make some content around this as I assume a lot of people thing it's just Vite on top of Metro.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: