Closed jjagielka closed 1 year ago
Easiest way would be to create an alias in vite (and tsconfig if applicable) of my-package-name
-> src/lib
. I do this for my svelte-modals
package
https://github.com/mattjennings/svelte-modals/blob/main/vite.config.js#L12
Perfect!
All works perfectly with:
However, if you're building a svelte package and want to supply nice documentation for it, using
$lib
is not the best option. Examples should show that you import from your just being built package. Is there a trick then to replace$lib
with thepackage_name
in the rendered examples?