DEV Community

Discussion on: How to build a Web App in 11 minutes and fall in love with SvelteKit

Collapse
 
valeriavg profile image
Valeria

Thank you) Svelte kit uses file names as route paths, therefore all the routes need to be in the src/routes folder. E.g. if you would like to render a page /blog/some-nice-title you would create a /src/routes/blog/some-nice-title.svelte. Same goes for the .ts ( or js) files with method handlers exported.
And the lib folder is conveniently aliased to avoid imports from ../../../../../src/lib/file.ts, so that you could simply import $lib/file.ts

Hope that helps:-)

Collapse
 
fyodorio profile image
Fyodor

Cool, very neat 🔥