Don't bundle but do transpile a TS file

Starting form a blank Ionic project how can I create a TS file that gets transpiled and correctly imports whatever it needs but that still results in an independent js file?

I assume I need to fiddle with Ionic’s NPM scripts or webpack or… None of which I have experience with.

Thanks for your help