Skip to content

Commit

Permalink
fix: create IPC channel for spawned babel-node process (#12836)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Feb 21, 2021
1 parent 5b99b8f commit 74dc70a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-node/src/babel-node.js
Expand Up @@ -81,7 +81,7 @@ getV8Flags(function (err, v8Flags) {

const child_process = require("child_process");
const proc = child_process.spawn(process.argv[0], args, {
stdio: "inherit",
stdio: ["inherit", "inherit", "inherit", "ipc"],
});
proc.on("exit", function (code, signal) {
process.on("exit", function () {
Expand Down
@@ -0,0 +1,2 @@
process.send({ hello: "world" });
console.log("sent");
@@ -0,0 +1,4 @@
{
"args": ["payload.js"],
"stdout": "sent"
}

0 comments on commit 74dc70a

Please sign in to comment.