pirates icon indicating copy to clipboard operation
pirates copied to clipboard

Any example for use ts-node/register an babel-node/register

Open MrKou47 opened this issue 7 years ago • 2 comments

I am trying to use ts-node/register -> babel-register to ensure my code can compiled with babel-plugin. Finally i find this repository.Could you provide an example for realize this goal?

MrKou47 avatar Jul 23 '18 07:07 MrKou47

It seems this isn't supported with ts-node.

marcj avatar Sep 04 '20 10:09 marcj

Oh, nevermind it works. For ts-node you just have to use additionally .tsx and .ts extensions, e.g.

addHook(transform, {exts: ['.js', '.tsx', '.ts']});

marcj avatar Sep 04 '20 11:09 marcj