3 ms·
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
by nwienert 2y ago
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.