7 ms·
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 altbdoor 1y ago
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 https://github.com/altbdoor/sucrase-build-iife
[2]: https://github.com/alangpierce/sucrase https://github.com/alangpierce/sucrase
- stagas 1y agoThanks for this! I gave it a shot and it works[1]. [1] https://github.com/stagas/tssw https://github.com/stagas/tssw