Svelte · Senior · Question 43 of 75
What happened to the $lib alias in SvelteKit 3?
- ✓Correct answer: It was replaced by a
#libalias declared inpackage.jsonimports, using Node's subpath imports - 2It was renamed to
~lib - 3It still works without changes
Explanation
Vite and TypeScript resolve subpath imports natively. Imports now include file extensions, e.g. #lib/foo.js.