Basic question here.
In Routify, anything in the top level of the pages directory is rendered with an endpoint that matches the page name.
Ok - got it!
However, if I want to create a component that is not intended as an endpoint and is only intended to be imported into another page that is a route, what directory structure do I use?
More generally, what do I need to know to do this? Best practices ?
Thank you!
You would simply place them in a directory adjacent to
pagesand then you do something likeimport MyComponent from '../../components/MyComponent.svelte(with the correct number of ..)As a bonus, if you call the folder
node_modulesinstead like thisyou can just do
import Mycomponent from 'MyComponent.svelte'but this is a way that not everyone likes.