-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,13 +159,13 @@ export function childWorker( | |
const ext = path.extname(import.meta.url); | ||
// modulePath is .ts. If we have been compiled, it should be changed to .js | ||
modulePath = modulePath.replace(/\.ts$/, ext); | ||
const absModulePath = new URL(`../${modulePath}`, import.meta.url).pathname; | ||
const moduleUrl = new URL(`../${modulePath}`, import.meta.url); | ||
|
||
args.push(...process.argv.slice(2)); | ||
|
||
if (singleProcessMode()) { | ||
const [parent, child] = inProcChannel(); | ||
import(absModulePath) | ||
import(moduleUrl.href) | ||
.then(({default: runWorker}) => | ||
runWorker(parent, env ?? process.env, ...args).then( | ||
() => child.emit('close', 0), | ||
|
@@ -176,7 +176,7 @@ export function childWorker( | |
return child; | ||
} | ||
return wrap( | ||
fork(absModulePath, args, { | ||
fork(moduleUrl, args, { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tantaman
Author
Contributor
|
||
detached: true, // do not automatically propagate SIGINT | ||
serialization: 'advanced', // use structured clone for IPC | ||
env, | ||
This comment has been minimized.
Sorry, something went wrong.
cbnsndwch
Contributor
|
||
|
This breaks typing:
This works: