DEV Community

Discussion on: Typescript, NodeJS and ES6/ESM Modules

Collapse
 
stargator profile image
Stargator

I have a TypeScript index.ts file and it compiles down to index.js in a dist directory. But I notice when an external script require() that library, it seems to be trying to run the TypeScript file and not the compiled file. Which causes an issue.

TypeScript and Node is a mess