Skip to content

Conversation

@kdaviduik
Copy link
Contributor

WHY are these changes introduced?

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).

WHAT is this pull request doing?

Sets declarationMap: true in this repo's tsconfig. Docs on declarationMap setting

HOW to test your changes?

Before Fix (Reproduce the Issue):

  1. Check out main branch in IDE, run npm install && npm run build at the root
  2. Reload TypeScript in your IDE:
  • VSCode: Cmd+Shift+P → "TypeScript: Restart TS Server"
  1. Open templates/skeleton/app/root.tsx
  2. Cmd+Click on getShopAnalytics (line 81)
  3. Result: 🔴 You're taken to packages/hydrogen/dist/production/index.d.ts
    (compiled declarations, no source code)

After Fix (Verify Solution):

  1. Checkout my branch
  2. Reload TypeScript: Cmd+Shift+P → "TypeScript: Restart TS Server"
  3. Open templates/skeleton/app/root.tsx
  4. Cmd+Click on getShopAnalytics (line 81)
  5. Result: ✅ You're taken to
    packages/hydrogen/src/analytics-manager/AnalyticsProvider.tsx:440 (actual source
    code)

Post-merge steps

N/A

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

…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).
@kdaviduik kdaviduik requested a review from a team as a code owner November 10, 2025 20:15
@shopify
Copy link
Contributor

shopify bot commented Nov 10, 2025

Oxygen deployed a preview of your kd-tsconfig-fix branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ⏳ In progress (Logs) - Inspect deployment November 10, 2025 8:15 PM

Learn more about Hydrogen's GitHub integration.

@kdaviduik kdaviduik marked this pull request as draft November 10, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant