forked from remix-run/remix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(remix-dev): don't look for a tsconfig outside rootDir
This patch addresses an issue[1] in which Remix looks for a tsconfig outside the root directory. We fix this behavior by looking for a tsconfig where it should be (in the rootDirectory itself) and passing its absolute path to `tsconfig-paths`. `tsconfig-paths` will then treat the given path as a tsconfig file path and won't crawl further. If no tsconfig file is found by us in our root directory, we simply won't call `tsconfig-paths` at all. Note that crawling up is `tsconfig-path`s intended behavior, but not Remix's. A secondary bug that causes this same issue is due to esbuild[2]. When no tsconfig is passed to esbuild, it will crawl the filesystem up looking for any tsconfig available and will load it. When tsconfig is explicitly set to `undefined`, it does the crawling anyways. Unfortunately, this is a fix that has to be done in `esbuild`, but a few alternatives to manage this unwanted behavior for now can be: 1. Create an empty tsconfig in the build directory and pass it to esbuild so it doesn't crawl outside rootDir; 2. Show a warning to let the user know why the crawling is happening. Fixes remix-run#3210 [1] remix-run#3210 [2] evanw/esbuild#2440 Signed-off-by: Juliana Oliveira <juliana@uma.ni>
- Loading branch information
Showing
7 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,7 @@ | |
- juwiragiye | ||
- jveldridge | ||
- jvnm-dev | ||
- jwnx | ||
- kalch | ||
- kanermichael | ||
- karimsan | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters