How the Metro transform works
At a high level:
- author
.css.tswith helpers from@opsydyn/crumbs-css/style - Metro sees the file through
withNativeStyles - the transformer evaluates the vanilla-extract-shaped module
- compatible declarations are converted into native style payloads
- the transformed module exports React Native-friendly values
This is why Metro configuration is mandatory. The package is not a runtime CSS interpreter; it is a compiler and runtime resolution layer built around Metro.
Expo’s Babel and Rust workers
Section titled “Expo’s Babel and Rust workers”Crumbs handles .css.ts authoring and delegates generated JavaScript, along with ordinary app JavaScript, to Expo’s supervising transform worker. On SDK 58, Expo can select its optional Rust backend for eligible files and Babel for files requiring fallback transforms. The Rust opt-in guide configures that Expo stage; it does not replace Crumbs’ Vanilla Extract compile phase. Keep withNativeStyles in both modes.