Skip to content

@babel/register: add typescript to default extensions -> .ts,.tsx #11833

@Hotell

Description

@Hotell

Feature Request

  • I would like to work on this feature!

Is your feature request related to a problem?

Currently when one uses typescript as language and type checking and babel for transpilation and with that tooling usage is needed, for instance with mocha or uvu etc, there is no way to use mocha --register @babel/register my-tests.spec.ts

Describe the solution you'd like

It would be nice to add typescript to default set off extensions.

With that set, we would need to add a check if preset-typescript is present and if it's not, we should error out with appropriate information for user - "Hey looks like you wanna transpile typescript but your config is missing 'preset-typescript' preset".

Describe alternatives you've considered.

Currently we need to use ts-node which feels quite redundant especially when all transpilation and tooling is powered by babel.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions