There is a dependency named graphql in node_modules.
I also have a src/graphql folder in my project.
In this folder, I have a Typescript file that imports from the graphql dependency:
import { GraphQLError } from 'graphql';
This is mistaken as a path reference by tspath, and it gets transpiled as:
const graphql_1 = require("../graphql/index.js");
Of course, the line can be skipped with // tspath: skip-file but it would be nice if tspath recognized that this is a reference to a dependency, and not to a folder. It would be as simple as collecting node_modules subfolders and giving them precedence over folder names.
There is a dependency named
graphqlinnode_modules.I also have a
src/graphqlfolder in my project.In this folder, I have a Typescript file that imports from the
graphqldependency:This is mistaken as a path reference by
tspath, and it gets transpiled as:Of course, the line can be skipped with
// tspath: skip-filebut it would be nice iftspathrecognized that this is a reference to a dependency, and not to a folder. It would be as simple as collectingnode_modulessubfolders and giving them precedence over folder names.