bennycode / ts2esm

Transforms TypeScript imports and exports into ESM-compatible declarations.
https://www.npmjs.com/package/ts2esm
48 stars 2 forks source link

Using with JS files. #80

Closed Redoxahmii closed 2 weeks ago

Redoxahmii commented 2 months ago

There isn't really any clarity on how this works for JS file just a link pointing to an issue. It asks for a tsconfig.json but as the project is not using typescript it does'nt have a tsconfig. Is that required for it to work ?

bennycode commented 2 months ago

Hi @Redoxahmii, do you have an open source JavaScript project where you want to try ts2esm? We could use it for testing.

TypeScript supports plain JavaScript through a jsconfig.json file.

bennycode commented 2 weeks ago

It has been successfully tested with plain JavaScript: https://github.com/bennycode/ts2esm/issues/20#issuecomment-1894702085