Skip to content

Commit

Permalink
fix: TS import paths importing index.ts twice incorrectly (#6415)
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 authored Apr 18, 2024
1 parent d591b18 commit 6066e92
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
8 changes: 7 additions & 1 deletion dev/tsconfig.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
"@sanity/util": ["./packages/@sanity/util/src/_exports/index.ts"],
"@sanity/vision": ["./packages/@sanity/vision/src/index.ts"],
"groq": ["./packages/groq/src/groq.ts"],
"sanity/*": ["./packages/sanity/src/_exports/*"],
"sanity/_internal": ["./packages/sanity/src/_exports/_internal.ts"],
"sanity/cli": ["./packages/sanity/src/_exports/cli.ts"],
"sanity/desk": ["./packages/sanity/src/_exports/desk.ts"],
"sanity/migrate": ["./packages/sanity/src/_exports/migrate.ts"],
"sanity/presentation": ["./packages/sanity/src/_exports/presentation.ts"],
"sanity/router": ["./packages/sanity/src/_exports/router.ts"],
"sanity/structure": ["./packages/sanity/src/_exports/structure.ts"],
"sanity": ["./packages/sanity/src/_exports/index.ts"]
}
}
Expand Down
8 changes: 7 additions & 1 deletion examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
"@sanity/util": ["./packages/@sanity/util/src/_exports/index.ts"],
"@sanity/vision": ["./packages/@sanity/vision/src/index.ts"],
"groq": ["./packages/groq/src/groq.ts"],
"sanity/*": ["./packages/sanity/src/_exports/*"],
"sanity/_internal": ["./packages/sanity/src/_exports/_internal.ts"],
"sanity/cli": ["./packages/sanity/src/_exports/cli.ts"],
"sanity/desk": ["./packages/sanity/src/_exports/desk.ts"],
"sanity/migrate": ["./packages/sanity/src/_exports/migrate.ts"],
"sanity/presentation": ["./packages/sanity/src/_exports/presentation.ts"],
"sanity/router": ["./packages/sanity/src/_exports/router.ts"],
"sanity/structure": ["./packages/sanity/src/_exports/structure.ts"],
"sanity": ["./packages/sanity/src/_exports/index.ts"]
}
}
Expand Down
8 changes: 7 additions & 1 deletion packages/@sanity/vision/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@
"@sanity/util/*": ["./node_modules/@sanity/util/src/_exports/*"],
"@sanity/util": ["./node_modules/@sanity/util/src/_exports/index.ts"],
"groq": ["./node_modules/groq/src/groq.ts"],
"sanity/*": ["./node_modules/sanity/src/_exports/*"],
"sanity/_internal": ["./node_modules/sanity/src/_exports/_internal.ts"],
"sanity/cli": ["./node_modules/sanity/src/_exports/cli.ts"],
"sanity/desk": ["./node_modules/sanity/src/_exports/desk.ts"],
"sanity/migrate": ["./node_modules/sanity/src/_exports/migrate.ts"],
"sanity/presentation": ["./node_modules/sanity/src/_exports/presentation.ts"],
"sanity/router": ["./node_modules/sanity/src/_exports/router.ts"],
"sanity/structure": ["./node_modules/sanity/src/_exports/structure.ts"],
"sanity": ["./node_modules/sanity/src/_exports/index.ts"]
}
}
Expand Down
8 changes: 7 additions & 1 deletion packages/sanity/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@
"@sanity/util/*": ["./node_modules/@sanity/util/src/_exports/*"],
"@sanity/util": ["./node_modules/@sanity/util/src/_exports/index.ts"],
"groq": ["./node_modules/groq/src/groq.ts"],
"sanity/*": ["./src/_exports/*"],
"sanity/_internal": ["./src/_exports/_internal.ts"],
"sanity/cli": ["./src/_exports/cli.ts"],
"sanity/desk": ["./src/_exports/desk.ts"],
"sanity/migrate": ["./src/_exports/migrate.ts"],
"sanity/presentation": ["./src/_exports/presentation.ts"],
"sanity/router": ["./src/_exports/router.ts"],
"sanity/structure": ["./src/_exports/structure.ts"],
"sanity": ["./src/_exports/index.ts"]
}
}
Expand Down
8 changes: 7 additions & 1 deletion packages/sanity/tsconfig.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"rootDir": ".",
"outDir": "./lib",
"paths": {
"sanity/*": ["./src/_exports/*"],
"sanity/_internal": ["./src/_exports/_internal.ts"],
"sanity/cli": ["./src/_exports/cli.ts"],
"sanity/desk": ["./src/_exports/desk.ts"],
"sanity/migrate": ["./src/_exports/migrate.ts"],
"sanity/presentation": ["./src/_exports/presentation.ts"],
"sanity/router": ["./src/_exports/router.ts"],
"sanity/structure": ["./src/_exports/structure.ts"],
"sanity": ["./src/_exports/index.ts"]
},
// For import.meta.env/import.meta.hot definition and similar
Expand Down

0 comments on commit 6066e92

Please sign in to comment.