Skip to content

Commit d78a09d

Browse files
committed
docs
1 parent 5142acc commit d78a09d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ When deploying your application, the server generated by SvelteKit is bundled in
184184

185185
### Accessing the file system
186186

187-
You can't use `fs` in Cloudflare Workers — you must [prerender](page-options#prerender) the routes in question.
187+
You can't use `fs` in Cloudflare Workers.
188+
189+
Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. It works by fetching the file from the deployed public assets location.
190+
191+
Alternatively, you can [prerender](page-options#prerender) the routes in question.
188192

189193
## Migrating from Workers Sites
190194

documentation/docs/25-build-and-deploy/80-adapter-netlify.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ Additionally, you can add your own Netlify functions by creating a directory for
115115

116116
### Accessing the file system
117117

118-
You can't use `fs` in edge deployments.
118+
You can't use `fs` in edge functions.
119119

120-
You _can_ use it in serverless deployments, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. `read` does not work inside edge deployments (this may change in future).
120+
You _can_ use it in serverless functions, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. It also works inside edge deployments by fetching the file from the deployed public assets location.
121121

122122
Alternatively, you can [prerender](page-options#prerender) the routes in question.

documentation/docs/25-build-and-deploy/90-adapter-vercel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,6 @@ Projects created before a certain date may default to using an older Node versio
194194

195195
You can't use `fs` in edge functions.
196196

197-
You _can_ use it in serverless functions, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. `read` does not work inside routes deployed as edge functions (this may change in future).
197+
You _can_ use it in serverless functions, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. It also works inside routes deployed as edge functions by fetching the file from the deployed public assets location.
198198

199199
Alternatively, you can [prerender](page-options#prerender) the routes in question.

0 commit comments

Comments
 (0)