gulpjs / interpret

A dictionary of file extensions and associated module loaders.
MIT License
259 stars 47 forks source link

Use transpile only version of ts-node for better performance during runtime load #69

Closed a7ul closed 4 years ago

a7ul commented 4 years ago

Hi

when using interpret with typescript files and ts-node, there is significant initial load time. To improve this, ts-node has transpile-only option which is fast and production ready. This PR add transpile only option to ts-node register.

For more details: https://github.com/TypeStrong/ts-node/issues/104#issuecomment-525358504

phated commented 4 years ago

Since this is using the same module, this would be a breaking change.

The goal of using Surcrase in #66 was performance. Maybe you want to switch?

phated commented 4 years ago

cc @flipsasser and @blakeembrey ☝️

blakeembrey commented 4 years ago

This probably makes sense, I'm not sure if people do or do not expect their code to be type checked when it's loaded with interpret. Is there any philosophical stance in interpret? The file was added in V6 in 2018 so has fairly large adoption.

flipsasser commented 4 years ago

Most of this is above my pay grade - but I recommend giving Sucrase a look if you're looking for something extremely fast, @a7ul

a7ul commented 4 years ago

Yep, I have switched over to sucrase for now. Thanks