JavaScript, TypeScript, Module Resolution and Module Alias
Recently, I’ve encountered an interesting issue with a project using TypeScript. In this article, I will describe the problem, the investigation I did and how I locate the root cause, and suggest some solutions.
What happened We have a project that’s a “pure” TypeScript project – the codebase contains no JavaScript file, except for some configuration. As part of the build process, TypeScript is transpiled into JavaScript with tsc. Within the container, the project call node and runs the transpiled index.