Compiler
Read what compile() emits, know which literal and root rewrites it applies, write compiler plugins that run in the build, and pass them to the Vite plugin.
@shadow-js/compiler turns the JSX of a module into calls to the runtime and rewrites single-value useStore calls to signal cells. The Vite plugin calls its compile() for every module it compiles, and you can call it yourself in a build script. This page covers what the output looks like and which rewrites make it small, then the plugin API: how to write a compiler plugin, in what order plugins run, how they report and edit, and what they cost. The Vite plugin page covers the build setup; performance explains the runtime cost of what the compiler emits.
The compiler is build-time code. It is not part of an application bundle, and nothing on this page adds a byte to one.