knightedcodemonkey / duel

TypeScript dual packages.
MIT License
20 stars 4 forks source link

Replace import.meta.url, _filename, and _dirname appropriately #42

Closed knightedcodemonkey closed 3 months ago

knightedcodemonkey commented 3 months ago

When the dual build is CJS

When the dual build is ESM

https://nodejs.org/api/esm.html#no-__filename-or-__dirname

knightedcodemonkey commented 3 months ago

Interesting tsc behavior filed in TypeScript/58658.