I'm not sure if there is an API for that. More specifically I want it so that all files that ends in .ts or .tsx will get a SWC transpiler pass to strip the type information -- without having to go though a tsc transpile beforehand.
It would also be pretty useful if you want to get ES2022/ESNext code to transpile down to ES2020 for compatibility's sake.
I need to hook the loader like this article: https://glebbahmutov.com/blog/hooking-into-node-loader-for-fun-and-profit/
I'm not sure if there is an API for that. More specifically I want it so that all files that ends in .ts or .tsx will get a SWC transpiler pass to strip the type information -- without having to go though a tsc transpile beforehand.
It would also be pretty useful if you want to get ES2022/ESNext code to transpile down to ES2020 for compatibility's sake.
I'm very confident about the performance of SWC (https://swc.rs/docs/benchmarks) so an async API is optional.
I need to transpile all modules -- regardless whether it is from a file or from a remote source.