Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: once an importer is matched, end directory traversal
The plugin starts with the importer‘s immediate parent directory, then uses `path.dirname` to continue up the ancestry until a matching tsconfig is found. A match is determined by the `include` and `exclude` arrays of a tsconfig. Currently, the `files` array is mostly ignored. Anyway, the bug was that we were returning `[undefined, false]` in cases where the tsconfig matched, which was incorrect. The right behavior is to return `[undefined, true]` to indicate the search for a matching tsconfig can end early. This bug affected both correctness and performance, although the latter was possibly negligible.
- Loading branch information