Skip to content

Commit

Permalink
TS: Move paths from tsconfig.app.json to tsconfig.json
Browse files Browse the repository at this point in the history
So that components.json and eslint-import-resolver-typescript
work as they don't appear to support "tsc -b".
  • Loading branch information
philbates35 committed Feb 29, 2024
1 parent 5c73e4d commit 02e0c51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 1 addition & 5 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["resources/js"],
"exclude": ["resources/js/**/__tests__/*"],
"compilerOptions": {
Expand All @@ -19,11 +20,6 @@
"isolatedModules": true,
"noEmit": true,

/* Absolute imports */
"paths": {
"@/*": ["./resources/js/*"]
},

/* Linting */
"strict": true,
"noUnusedLocals": true,
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"files": [],
"compilerOptions": {
// Absolute imports. Define here instead of tsconfig.app.json because e.g. eslint-import-resolver-typescript
// and shadcn-ui don't support project references and only read directly from this file
"paths": {
"@/*": ["./resources/js/*"]
}
},
"references": [
{
"path": "./tsconfig.app.json"
Expand Down

0 comments on commit 02e0c51

Please sign in to comment.