Skip to content

Commit 2da7572

Browse files
authored
chore: add Content-Type header for invoke response (#161)
1 parent 5cec737 commit 2da7572

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/web-worker/src/lib/fetch-module-server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function vitePluginFetchModuleServer(): Plugin {
1010
const [name, payload] = JSON.parse(url.searchParams.get("data")!);
1111
const devEnv = server.environments[name]!;
1212
const result = await devEnv.hot.handleInvoke(payload);
13+
res.setHeader("Content-Type", "application/json");
1314
res.end(JSON.stringify(result));
1415
return;
1516
}

0 commit comments

Comments
 (0)