I'm wondering if it would be useful/possible to run the compilation in a service worker that would intercept requests for *.ts and compile them in the worker?
I've seen an alternative approach, where the TS code is sent for compilation to a dedicated server - dismissed that idea as over engineered, but then I learned that the swc WASM package clocks in at over 5MB.
I love the name BTW.