fix(js): sourcemaps should work with js:node executor (#17261)
This commit is contained in:
parent
7dd8fb615e
commit
f01cdca79d
@ -135,8 +135,9 @@ export async function* nodeExecutor(
|
|||||||
task.promise = new Promise<void>((resolve, reject) => {
|
task.promise = new Promise<void>((resolve, reject) => {
|
||||||
task.childProcess = fork(
|
task.childProcess = fork(
|
||||||
joinPathFragments(__dirname, 'node-with-require-overrides'),
|
joinPathFragments(__dirname, 'node-with-require-overrides'),
|
||||||
getExecArgv(options),
|
options.runtimeArgs ?? [],
|
||||||
{
|
{
|
||||||
|
execArgv: getExecArgv(options),
|
||||||
stdio: [0, 1, 'pipe', 'ipc'],
|
stdio: [0, 1, 'pipe', 'ipc'],
|
||||||
env: {
|
env: {
|
||||||
...process.env,
|
...process.env,
|
||||||
@ -230,11 +231,7 @@ export async function* nodeExecutor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getExecArgv(options: NodeExecutorOptions) {
|
function getExecArgv(options: NodeExecutorOptions) {
|
||||||
const args = [
|
const args = ['-r', require.resolve('source-map-support/register')];
|
||||||
'-r',
|
|
||||||
require.resolve('source-map-support/register'),
|
|
||||||
...options.runtimeArgs,
|
|
||||||
];
|
|
||||||
|
|
||||||
if (options.inspect === true) {
|
if (options.inspect === true) {
|
||||||
options.inspect = InspectType.Inspect;
|
options.inspect = InspectType.Inspect;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user