diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-06-02 09:22:01 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-06-02 09:22:01 -0300 |
commit | d646ae0de00aebefb15faedfbdfe9995e2250b17 (patch) | |
tree | e9760af727beaa2147a8481c94f277dc65ccc1d2 /src/write/build-modes | |
parent | d46263754923e99ada6a9b368929a1f7c9b78f7f (diff) |
build: live-dev-server: don't writeHead until content is ready
Cherry-picked from 63be025
Diffstat (limited to 'src/write/build-modes')
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index 3cd3ed6b..10b40cf0 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -330,8 +330,6 @@ export async function go({ return; } - response.writeHead(200, contentTypeHTML); - const localizedPathnames = getPagePathnameAcrossLanguages({ defaultLanguage, languages, @@ -464,19 +462,8 @@ export async function go({ const pageHTML = topLevelResult.toString(); - /* - const pageHTML = generateDocumentHTML(pageInfo, { - ...bound, - cachebust, - developersComment, - localizedPathnames, - oEmbedJSONHref: null, // No oEmbed support for live dev server - pagePath: servePath, - pathname, - }); - */ - console.log(`${requestHead} [200] ${pathname}`); + response.writeHead(200, contentTypeHTML); response.end(pageHTML); } catch (error) { response.writeHead(500, contentTypePlain); |