kit: implement server components dev server (#14025)

This commit is contained in:
dave caruso
2024-09-27 20:53:39 -07:00
committed by GitHub
parent d09df1af47
commit 514d37b3d2
82 changed files with 3812 additions and 5964 deletions

View File

@@ -41,10 +41,14 @@ const results = await Promise.allSettled(
// @ts-ignore
let code = await result.outputs[0].text();
// A second pass is used to convert global variables into parameters, while
// allowing for renaming to properly function when minification is enabled.
const in_names = ["input_graph", "config", mode === "server" && "server_fetch_function"].filter(Boolean);
const combined_source = `
// A second pass is used to convert global variables into parameters, while
// allowing for renaming to properly function when minification is enabled.
const in_names = [
'input_graph',
'config',
mode === 'server' && 'server_exports'
].filter(Boolean);
const combined_source = `
__marker__;
let ${in_names.join(",")};
__marker__(${in_names.join(",")});