Skip to content

javascript: resolve $lib, ~ and @ when the config only extends a framework's generated one - #1773

Merged
swapnilpaliwal-sd merged 1 commit into
0.1.8from
loop/ja-is1756
Sep 29, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
0.1.8from
loop/ja-is1756

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

A SvelteKit or Nuxt JS project's config only extends/references the framework's generated .svelte-kit/tsconfig.json / .nuxt/tsconfig*.json, absent from a checkout, so $lib/…, ~/…, @/… imports never resolved. When that generated config is missing and the project sets no paths, the framework's default mapping is applied ($lib → src/lib; ~/@ → app/ then root; ~~/@@ → root).

  • New golden case 71-framework-generated-config-alias (SvelteKit, Nuxt 3, Nuxt 4 references) with controls: a project's own paths still wins; a missing non-framework extended config still maps nothing.
  • Checked: fixture 0 → 5 resolved, controls unchanged; a real SvelteKit app's $lib/api callers 0 → 19 resolved (by-name 48 → 25, the rest are FormData.get); index 4.3s → 4.7s. JS engine suite 84/84 with oracle, javascript-tests.ts 49/49.

Closes #1756

…ework's generated one

A SvelteKit or Nuxt project's jsconfig/tsconfig extends (or references)
.svelte-kit/tsconfig.json or .nuxt/tsconfig*.json, which the framework writes at
dev/build time and a checkout lacks, so no paths were read and every $lib/x or
~/x import was unresolved. When that generated config is absent and the project
maps nothing itself, apply the framework's default mapping.

Closes #1756

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 4a1848f into 0.1.8 Sep 29, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the loop/ja-is1756 branch September 29, 2026 05:52
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