You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
should allow use export = in .cts when module is esnext #51018
Activity
RyanCavanaugh commentedon Oct 7, 2022
What code is supposed to be generated in this case?
bluelovers commentedon Oct 7, 2022
input
https://github.com/bluelovers/ws-glob/blob/master/packages/glob-tree-list/src/index.cts
https://github.com/bluelovers/ws-glob/blob/master/packages/glob-tree-list/src/index.ts
output
https://github.com/bluelovers/ws-glob/blob/master/packages/glob-tree-list/dist/index.cjs.development.cjs
https://github.com/bluelovers/ws-glob/blob/master/packages/glob-tree-list/dist/index.esm.mjs
RyanCavanaugh commentedon Oct 7, 2022
https://github.com/bluelovers/ws-glob/blob/master/packages/glob-tree-list/dist/index.esm.mjs - this is just a
defaultexport, like it's telling you to do.export = (a functiondoesn't make sense in an ES Module output format. What's the motivation for not writingexport default globToTree?fatcerberus commentedon Oct 11, 2022
Ryan Cavanaugh (@RyanCavanaugh) I guess they’re expecting the
.ctsfile to compile to CommonJS instead of ESM?andrewbranch commentedon Aug 8, 2024
This was implemented as a new feature in 5.6 (#58825)