Skip to content

[feat] TypeScript related extensions should be supported in favor of Node.js type stripping #84

@JounQin

Description

@JounQin

Initial checklist

Problem

https://nodejs.org/en/learn/typescript/run-natively

Custom remark config path with, for example, remarkrc.ts

Current solutions

N/A

Proposed solutions

Just add .ts, .mts .ts into:

const loaders = {
'.json': loadJson,
'.cjs': loadScriptOrModule,
'.mjs': loadScriptOrModule,
'.js': loadScriptOrModule,
'.yaml': loadYaml,
'.yml': loadYaml
}

I tried with Node 24 it runs very well, but with Node 22, it throws unknown extension .ts at

const result = await import(fileUrl)

Metadata

Metadata

Assignees

No one assigned

    Labels

    🤞 phase/openPost is being triaged manually

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions