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
* feat: implement readAsset
* lint etc
* maybe make it work on netlify? no idea how to test, manual deploys dont appear to respect .netlify directory
* set length/type from manifest
* tidy up
* regenerate types
* lint
* missed a spot
* more efficient manifest generation
* working on vercel
* lint/fix
* Update packages/adapter-vercel/index.js
Co-authored-by: Simon H <[email protected]>
* fix
* createReadable helper
* more future-proof API
* account for basepath
* lint
* rename to just `read`
* inline docs
* it is already deprecated, we just need to remove it
* read_asset -> read_implementation
* add test
* Apply suggestions from code review
Co-authored-by: Ben McCann <[email protected]>
* improve searchability
* prevent $app/server being imported client-side
* regenerate types
* add dev time feature tracking mechanism
* test feature support at build time
* lint
* lint
* regenerate types
* account for hooks.server.js, mostly
* regenerate types
* fix
* bump peerdeps, add changesets
* createReadable -> createReadableStream
* Apply suggestions from code review
Co-authored-by: Ben McCann <[email protected]>
* remove unnecessary if
* replace docs for find_server_assets
* update adapter author docs
* regenerate types
* explain what __SVELTEKIT_TRACK__ does
* mention `$app/server` on server-only modules page
* minor details
* oh ffs
* exclude prerendered routes from feature detection, handle /@fs assets in dev
* use read to populate content.json
* fix prerendering
* simplify
* simplify docs logic
* fix
* style
* simplify
* lockfile
* Apply suggestions from code review
Co-authored-by: Ben McCann <[email protected]>
* capitalize
* Apply suggestions from code review
Co-authored-by: Ben McCann <[email protected]>
---------
Co-authored-by: Rich Harris <[email protected]>
Co-authored-by: Simon H <[email protected]>
Co-authored-by: Ben McCann <[email protected]>
Copy file name to clipboardExpand all lines: documentation/docs/30-advanced/50-server-only-modules.md
+4
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ Like a good friend, SvelteKit keeps your secrets. When writing your backend and
8
8
9
9
The `$env/static/private` and `$env/dynamic/private` modules, which are covered in the [modules](modules) section, can only be imported into modules that only run on the server, such as [`hooks.server.js`](hooks#server-hooks) or [`+page.server.js`](routing#page-page-server-js).
10
10
11
+
## Server-only utilities
12
+
13
+
The [`$app/server`](/docs/modules#$app-server) module, which contains a `read` function for reading assets from the filesystem, can likewise only be imported by code that runs on the server.
14
+
11
15
## Your modules
12
16
13
17
You can make your own modules server-only in two ways:
0 commit comments