Skip to content

Add support for *.mts/*.cts files #4679

@Mia75owo

Description

@Mia75owo

Describe the feature

The current default supportet file extensions by the swc-cli are:
["js", "jsx", "es6", "es", "mjs", "ts", "tsx"]
I would love having support for .mts and .cts files which work like .ts or .tsx files
.mts => .mjs
.cts => .cjs
just like with tsx and jsx
.tsx => .jsx

it would work just like ts files but with an other extension (or optional even change the module settings)

Babel plugin or link to the feature description

No response

Additional context

https://www.typescriptlang.org/docs/handbook/esm-node.html#new-file-extensions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions