You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
javascript: imports through a SvelteKit or Nuxt alias never resolve when the config only extends the framework's generated tsconfig #1756
Symptom. In a SvelteKit or Nuxt app written in JavaScript, imports through the framework's own alias ($lib/api, ~/utils/price) never resolve, so every call through them is [by name]. The project's jsconfig.json/tsconfig.json only extends a config the framework generates at dev/build time (./.svelte-kit/tsconfig.json, ./.nuxt/tsconfig.json), which is absent from a checkout, so no paths are ever read.
Repro.
tsconfig.json {"extends":"./.nuxt/tsconfig.json"}
utils/price.js export function formatPrice(n) { return n; }
server/api/price.js import { formatPrice } from '~/utils/price';
export default function handler() { return formatPrice(1); }
axiomcode impact formatPrice → server/api/price.js:2 … [by name]. Same on a real SvelteKit app: import * as api from '$lib/api.js' in 10+ route files, every api.get/post by name.
Expected:handler → formatPrice resolved (the framework's default mapping: SvelteKit $lib/* → src/lib/*; Nuxt ~/*, @/* → the source dir) when the extended config does not exist. Actual: unresolved, [by name].
Consolidated into #1746, which tracks this issue together with related ones about JavaScript import aliases from bundler and framework configs. The description and reproduction here still apply, and the fix for the group covers them.
Activity
swapnilpaliwal-sd commentedon Sep 29, 2026
Consolidated into #1746, which tracks this issue together with related ones about JavaScript import aliases from bundler and framework configs. The description and reproduction here still apply, and the fix for the group covers them.
swapnilpaliwal-sd commentedon Sep 29, 2026
Fixed by #1773 (merged into 0.1.8).
javascript: resolve $lib, ~ and @ when the config only extends a fram…