fix(dev): keep Fast Refresh enabled under process managers
This commit is contained in:
@@ -20,6 +20,7 @@ const args = process.argv.slice(2);
|
||||
writeFileSync(root + "/" + role + ".pid", String(process.pid));
|
||||
writeFileSync(root + "/" + role + ".json", JSON.stringify({
|
||||
args, target: process.env.S2S_BACKEND_URL, hosts: process.env.S2S_DEV_ALLOWED_HOSTS,
|
||||
nodeEnv: process.env.NODE_ENV,
|
||||
}));
|
||||
if (process.env.S2S_TEST_FAIL === role) process.exit(37);
|
||||
const worker = spawn(process.execPath, ["-e",
|
||||
@@ -95,6 +96,7 @@ async function launcher(context: TestContext, env: Record<string, string> = {})
|
||||
...process.env,
|
||||
UI_PORT: String(publicPort),
|
||||
UI_HOST: "0.0.0.0",
|
||||
NODE_ENV: "production",
|
||||
S2S_BACKEND_PORT: "1",
|
||||
S2S_BACKEND_URL: "http://wrong-target.invalid",
|
||||
S2S_TEST_ROOT: root,
|
||||
@@ -133,6 +135,7 @@ for (const signal of ["SIGINT", "SIGTERM"] as const) {
|
||||
args: ["--host", "0.0.0.0", "--port", String(run.publicPort), "--strictPort"],
|
||||
target: `http://127.0.0.1:${run.backendPort}`,
|
||||
hosts: "s2s.test",
|
||||
nodeEnv: "development",
|
||||
});
|
||||
assert.equal(run.output().includes("Installing"), false);
|
||||
run.child.kill(signal);
|
||||
|
||||
Reference in New Issue
Block a user