Skip to content

fix: exclude relative imports from tracing interception - #17005

Draft
svelte-triage-bot[bot] wants to merge 1 commit into
version-3from
triage/kit-17004-tracing-async-ssr
Draft

fix: exclude relative imports from tracing interception#17005
svelte-triage-bot[bot] wants to merge 1 commit into
version-3from
triage/kit-17004-tracing-async-ssr

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor

Closes #17004.

Problem

The observability quickstart used a bare import-in-the-middle register() call. This caused relative server chunks to be wrapped, snapshotting Svelte's mutable ssr_context ESM export and crashing SSR components that call onDestroy.

Fix

  • Configure synchronous import-in-the-middle registration to exclude relative imports.
  • Apply the same configuration to the supported-Node branch of the fallback example.
  • Document why application and framework chunks must not be intercepted.
  • Add regression coverage for tracing with experimental async SSR and onDestroy.

Verification

  • Focused Playwright regression: 2 passed
  • pnpm -F @sveltejs/kit test:unit
  • pnpm -F test-basics check
  • pnpm lint
  • pnpm check
  • pnpm format

@pkg-svelte-dev

pkg-svelte-dev Bot commented Sep 2, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from f2eeb2c:

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

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

Note

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

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.

experimental:tracing+async conflicts

0 participants