Fix: Only create @babel/node IPC channel when needed (#13295)

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
This commit is contained in:
Clark Jacobsohn
2021-05-11 17:59:07 -04:00
committed by GitHub
parent 875fc8e693
commit cca97d1e78
8 changed files with 38 additions and 35 deletions

View File

@@ -1,2 +1,2 @@
process.send({ hello: "world" });
console.log("sent");
console.log("ipc enabled");

View File

@@ -0,0 +1,6 @@
{
"args": ["payload.js"],
"ipcMessage": { "hello": "world" },
"ipc": true,
"stdout": "ipc enabled"
}

View File

@@ -0,0 +1,3 @@
if (process.send == null) {
console.log("ipc disabled");
}

View File

@@ -1,4 +1,4 @@
{
"args": ["payload.js"],
"stdout": "sent"
"stdout": "ipc disabled"
}

View File

@@ -1 +0,0 @@
process.send("hello");