Skip to content

fix: write the generated tsconfig to node_modules/$app/tsconfig.json - #16589

Merged
Rich-Harris merged 1 commit into
sveltejs:version-3from
Nic-Polumeyv:fix-app-tsconfig-resolution
Jul 30, 2026
Merged

fix: write the generated tsconfig to node_modules/$app/tsconfig.json#16589
Rich-Harris merged 1 commit into
sveltejs:version-3from
Nic-Polumeyv:fix-app-tsconfig-resolution

Conversation

@Nic-Polumeyv

Copy link
Copy Markdown
Contributor

Neat little find

The cause of the playwright pin is that its tsconfig loader only ever looks up node_modules/$app/tsconfig.json, while tsc also resolves the directory form we currently generate. Writing the file where both look removes the pin's cause and lets paths reach Playwright test files again. Verified against 1.61.1, 1.62.0 and 1.62.1.

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 44272b1:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/44272b1ee5c46cc719a0b31c1894805289b87abe

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16589

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 44272b1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris

Copy link
Copy Markdown
Member

This would introduce a discrepancy between $app/tsconfig and $app/tsconfig/service-worker — it would smooth things over but I feel like we need to lobby for a fix in Playwright itself, and only do this if it seems like that won't happen any time soon

@Nic-Polumeyv

Copy link
Copy Markdown
Contributor Author

There shouldn't be a discrepancy since both files are written by node_modules/<id>.json, so the two ids can't diverge.

Funny enough... they looked at exactly this two weeks ago. 1.62.0 made unresolved extends a hard error, it broke monorepos (microsoft/playwright#41989), and they reverted in microsoft/playwright#42005. So yeah, nothing will happen anytime soon. I don't mind opening the upstream issue regardless.

@Rich-Harris

Copy link
Copy Markdown
Member

Ah gotcha — I missed that both generated tsconfigs are affected, I thought we'd be generating this pair:

node_modules/$app/tsconfig.json
node_modules/$app/tsconfig/service-worker/tsconfig.json

It sounds like they're already aware of the gap with tsc, so probably no need to open a fresh issue, though I've asked if it's tracked anywhere that we can subscribe to

@Rich-Harris
Rich-Harris merged commit 38f1528 into sveltejs:version-3 Jul 30, 2026
21 of 22 checks passed
@Nic-Polumeyv
Nic-Polumeyv deleted the fix-app-tsconfig-resolution branch July 30, 2026 22:53
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.

2 participants