Wanted to add $components and this absolutely works like a charm, thank you. Vite really is awesome!
Also, if you're using WebStorm like me (or a WebStorm variant like PhpStom), you can also enable the IDE's ability to resolve those special $lib/* paths (and whatever other custom aliases you setup) by a .js file in the root of your project which calls an undocumented System.config() function that tells WebStorm how where to find them:
Wanted to add
$components
and this absolutely works like a charm, thank you. Vite really is awesome!Also, if you're using WebStorm like me (or a WebStorm variant like PhpStom), you can also enable the IDE's ability to resolve those special
$lib/*
paths (and whatever other custom aliases you setup) by a.js
file in the root of your project which calls an undocumentedSystem.config()
function that tells WebStorm how where to find them:I expand a bit more on this in a self-answered StackOverflow post here.