I've tried this before, with a service worker[1] that intercepts TS/X-ish requests, and directing them over to sucrase[2] to compile to JS, before being loaded by the browser. Unfortunately sucrase seems to be no longer maintained.[1]: https://github.com/altbdoor/sucrase-build-iife
[2]: https://github.com/alangpierce/sucrase
stagas|7 months ago
[1] https://github.com/stagas/tssw