fix: attach __svelte_meta correctly to elements following a CSS wrapper
Merged
RI
2y ago+69+69+01234567890123456789-1-1-0123456789
spotted while working on #15538 — if we insert a <svelte-css-wrapper>, it desyncs the template from the locations array, meaning the __svelte_meta object (which allows things like the inspector to work) is attached to the wrong element
Before submitting the PR, please make sure you do the following
- It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
- Prefix your PR title with
feat:,fix:,chore:, ordocs:. - This message body should clearly illustrate what problems it solves.
- Ideally, include a test that fails without this PR but passes with it.
- If this PR changes code within
packages/svelte/src, add a changeset (npx changeset).
Tests and linting
- Run the tests with
pnpm testand lint the project withpnpm lint