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
In SvelteKit 2 we have $app/*, $lib/*, $env/* and $service-worker. In SvelteKit 3 we're getting rid of $env/*. I think we should consider getting rid of $service-worker as well, since it's a bit of an anomaly. Doing so would leave just $app/* (generated modules specific to your app) and $lib/* (your stuff) alongside the @sveltejs/kit modules, which feels a bit friendlier and easier to explain.
Describe the proposed solution
It exports base, build, files, prerendered and version.
base could presumably be imported from $app/paths. At present this module can't be imported into the service worker but that feels like an unnecessary restriction. There might be some Vite footwork involved in making it work but I'm pretty sure it's possible.
build, files and prerendered could perhaps be exported from a new $app/assets or $app/manifest module. They're primarily intended for service worker caching but it's not inconceivable that they could be useful in other contexts, so making it more generic feels like a win.
version could be imported from $app/env. As with $app/paths, it's not currently available IIRC but I don't see why it shouldn't be.
Activity
Rich-Harris commentedon Jun 26, 2026
See also #16182
Rich-Harris commentedon Jul 8, 2026
Thought: if we expose
routesfrom$app/manifest, we could/should updatepreloadCodeto accept aRouteIdrather than astringfix: populate `version` in service workers (#16434)
feat: add `$app/manifest` module (#16372)
feat: make `$app/paths` importable in service workers (#16441)
teemingc commentedon Jul 24, 2026
Closed by #16450