Repository navigation
Replies: 1 comment 3 replies
|
Can you create an issue with a minimal reproduction that details how the alias option no longer works the same as before? It should work the same if someone adds $lib there. We kept it around to help ease migration although it’s deprecated |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have tried out the new SvelteKit 3 Release Candidate version and so far so good. Just one thing directly caught my attention: the '$lib' alias is removed and it seems the alias configuration doesn't work anymore as before in SvelteKit 2. I know we now have the fancy node.js built-in feature of subpath imports but they are not good enough. The alias option was ground breaking for me because it set the typescript types automatically PLUS I could generate any path for vite to load, kind of using it as virtual modules. This is not possible with subpath imports and they are usually defined within package.json. Since the SvelteKit config now moved to the vite config (best solution ever, by the way, I really love it!!), I would expect the alias to be configured there so all typescript types work out of the box again, (and the generated paths, e.g. based on an environment variable).
All reactions