Skip to content

Commit

Permalink
refactor: stop using tsconfig-paths package
Browse files Browse the repository at this point in the history
It is better to let Vite handle all of the resolving, so this plugin is only responsible for the path mapping.

At the same time, I am also adding the `tsconfck` package, which handles the loading of tsconfig.json files for us. This package is also used in Vite core (we should have Vite expose it in the future, to avoid the duplication).

The `tsconfig-paths` package was previously responsible for config loading and much of the path resolving logic, but now we can ditch it! I'm also ditching the `recrawl-sync` package, which was used for crawling the filesystem in search of tsconfig.json files.

Fixes #54
Closes #73
Probably fixes #63
Probably fixes #68
  • Loading branch information
aleclarson committed Nov 26, 2022
1 parent df28cde commit 3111cb1
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 162 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"dependencies": {
"debug": "^4.1.1",
"globrex": "^0.1.2",
"recrawl-sync": "^2.0.3",
"tsconfig-paths": "^4.0.0"
"tsconfck": "^2.0.1"
},
"devDependencies": {
"@alloc/fast-rimraf": "^1.0.8",
Expand All @@ -40,8 +39,8 @@
"klona": "^2.0.4",
"prettier": "^2.0.5",
"rollup": "^2.45.2",
"tsup": "^4.10.1",
"typescript": "^4.2.4",
"tsup": "^6.5.0",
"typescript": "^4.9.3",
"vite": "*",
"vite-tsconfig-paths": "link:."
},
Expand Down
49 changes: 0 additions & 49 deletions src/config.ts

This file was deleted.

Loading

0 comments on commit 3111cb1

Please sign in to comment.