diff options
Diffstat (limited to 'src/write/build-modes')
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index dfebda0e..6dfa7d71 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -226,7 +226,11 @@ export async function go({ }[extname]; try { - response.writeHead(200, contentType ? {'Content-Type': contentType} : {}); + const {size} = await stat(filePath); + response.writeHead(200, contentType ? { + 'Content-Type': contentType, + 'Content-Length': size, + } : {}); await pipeline( createReadStream(filePath), response); |