@sveltejs/adapter-netlify 1.0.0-next.73 → 1.0.0-next.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/files/edge.js +3 -2
- package/package.json +1 -1
package/files/edge.js
CHANGED
|
@@ -4,7 +4,7 @@ import { manifest, prerendered } from 'MANIFEST';
|
|
|
4
4
|
const server = new Server(manifest);
|
|
5
5
|
const prefix = `/${manifest.appDir}/`;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const initialized = server.init({
|
|
8
8
|
// @ts-ignore
|
|
9
9
|
env: Deno.env.toObject()
|
|
10
10
|
});
|
|
@@ -14,13 +14,14 @@ await server.init({
|
|
|
14
14
|
* @param { any } context
|
|
15
15
|
* @returns { Promise<Response> }
|
|
16
16
|
*/
|
|
17
|
-
export default function handler(request, context) {
|
|
17
|
+
export default async function handler(request, context) {
|
|
18
18
|
if (is_static_file(request)) {
|
|
19
19
|
// Static files can skip the handler
|
|
20
20
|
// TODO can we serve _app/immutable files with an immutable cache header?
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
await initialized;
|
|
24
25
|
return server.respond(request, {
|
|
25
26
|
platform: { context },
|
|
26
27
|
getClientAddress() {
|