Hacker News new | ask | show | jobs
by altbdoor 328 days 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

[2]: https://github.com/alangpierce/sucrase

1 comments

Thanks for this! I gave it a shot and it works[1].

[1] https://github.com/stagas/tssw