From 4051ddbf6f391c7a043bb42ee014056045411b68 Mon Sep 17 00:00:00 2001 From: Kara Daviduik Date: Mon, 10 Nov 2025 15:07:17 -0500 Subject: [PATCH] Update tsconfig so that `cmd+click`ing takes you to source code, not d.ts file Previously, if I was in a file like `templates/skeleton/app/root.tsx` and I cmd+clicked on the function 'getShopifyAnalytics` (to go to its definition), I was taken to a d.ts file and not the actual source code in the Hydrogen package. Now, I'm taken to the actual source code (ie: `packages/hydrogen/src/analytics-manager/AnalyticsProvider.tsx in this case). --- templates/skeleton/tsconfig.json | 4 +++- tsconfig.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/skeleton/tsconfig.json b/templates/skeleton/tsconfig.json index 54587bd582..1d90e0a30a 100644 --- a/templates/skeleton/tsconfig.json +++ b/templates/skeleton/tsconfig.json @@ -32,7 +32,9 @@ "vite/client" ], "paths": { - "~/*": ["app/*"] + "~/*": ["app/*"], + "@shopify/hydrogen": ["../../packages/hydrogen/src"], + "@shopify/hydrogen/*": ["../../packages/hydrogen/src/*"] }, "noEmit": true, "rootDirs": [".", "./.react-router/types"], diff --git a/tsconfig.json b/tsconfig.json index 1eb396c269..43b62f8241 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "allowSyntheticDefaultImports": true, "strict": true, "declaration": true, + "declarationMap": true, "isolatedModules": true, "esModuleInterop": true, "resolveJsonModule": true,