Skip to content

fix: ignore Svelte script src imports#836

Closed
BartWaardenburg wants to merge 2 commits into
mainfrom
fix/issue-835-svelte-script-src
Closed

fix: ignore Svelte script src imports#836
BartWaardenburg wants to merge 2 commits into
mainfrom
fix/issue-835-svelte-script-src

Conversation

@BartWaardenburg
Copy link
Copy Markdown
Collaborator

@BartWaardenburg BartWaardenburg commented Jun 1, 2026

Summary

  • Svelte SFC markup-level <script src> references stay parsed as metadata but no longer emit synthetic imports.
  • Vue external <script src> and SFC <style src> behavior stays unchanged.
  • Added regression coverage for the reported SvelteKit <svelte:head> shape plus Svelte src variants.

Issue

Closes #835

Verification

  • Minimal regression test for the reported SvelteKit head script.
  • Real-world validation on a copied Knip SvelteKit fixture with <svelte:head><script src="/some-lib.min.js" async></script></svelte:head>: origin/main reports /some-lib.min.js, this branch does not.
  • cargo check --workspace
  • cargo test --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • cargo doc --workspace --no-deps --document-private-items
  • typos .
  • git diff --check
  • fallow audit --format json --quiet (warn verdict from generated-file duplication unrelated to this Svelte change)

@BartWaardenburg BartWaardenburg force-pushed the fix/issue-835-svelte-script-src branch from d5d80c8 to 0423cc8 Compare June 1, 2026 18:21
@BartWaardenburg BartWaardenburg marked this pull request as ready for review June 1, 2026 18:23
@BartWaardenburg BartWaardenburg deleted the fix/issue-835-svelte-script-src branch June 1, 2026 18:34
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.

Svelte SFC: HTML <script src="..."> tags reported as unresolved-import

1 participant