Created
May 29, 2021 03:34
-
-
Save splatte/8d57ba18d5f0643119e242beb424a3c3 to your computer and use it in GitHub Desktop.
patch for adapter-netlify/files/entry.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/@sveltejs/adapter-netlify/files/entry.js b/node_modules/@sveltejs/adapter-netlify/files/entry.js | |
index c230c41..1aa9fae 100644 | |
--- a/node_modules/@sveltejs/adapter-netlify/files/entry.js | |
+++ b/node_modules/@sveltejs/adapter-netlify/files/entry.js | |
@@ -3,8 +3,9 @@ import '@sveltejs/kit/install-fetch'; // eslint-disable-line import/no-unresolve | |
// TODO hardcoding the relative location makes this brittle | |
import { render } from '../output/server/app.js'; // eslint-disable-line import/no-unresolved | |
-export async function handler(event) { | |
+export async function handler(event, context) { | |
const { path, httpMethod, headers, rawQuery, body, isBase64Encoded } = event; | |
+ const { clientContext } = context | |
const query = new URLSearchParams(rawQuery); | |
@@ -20,7 +21,8 @@ export async function handler(event) { | |
headers, | |
path, | |
query, | |
- rawBody | |
+ rawBody, | |
+ netlifyContext: clientContext | |
}); | |
if (rendered) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment