You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking of a special folder type called Internal Directories which are basically lib folders that can only be accessed by the route and children of the route its in.
This basically explains everything and you may make a comment to ask any questions you have.
src/routes/
thing1/
-lib/
importantlib.ts
+page.svelte
+page.server.ts (imports importantlib ✅)
thing2/
+page.svelte
+page.server.ts (attempts to import importantlib, but errors 🚫)
blog/
-lib/
BlogComponent.svelte (cannot import anything outside of this folder or the parent -lib folder)
[slug]/
+page.svelte (imports BlogComponent ✅)
+page.server.ts (imports auth ✅)
-lib/
auth.ts (cannot import anything outside of this folder)
+page.svelte (not actually a page, but a component)
[x+2d]lib/
+page.svelte (page that shows up at /-lib)
+page.svelte (imports ./-lib/auth.ts ✅)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I was thinking of a special folder type called Internal Directories which are basically lib folders that can only be accessed by the route and children of the route its in.
This basically explains everything and you may make a comment to ask any questions you have.
Beta Was this translation helpful? Give feedback.
All reactions