Skip to content

Commit

Permalink
feat: drop 'source-map-support' injection in favor of nodejs flag
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk committed Jul 3, 2024
1 parent d87405a commit d857d9b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions actions/start.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,21 +175,11 @@ export class StartAction extends BuildAction {
typeof debug === 'string' ? `--inspect=${debug}` : '--inspect';
processArgs.unshift(inspectFlag);
}
const sourceMapsRegisterPath = this.getSourceMapSupportPkg();
if (sourceMapsRegisterPath !== undefined) {
processArgs.unshift(`-r "${sourceMapsRegisterPath}"`);
}
processArgs.unshift('--enable-source-maps');

return spawn(binaryToRun, processArgs, {
stdio: 'inherit',
shell: true,
});
}

private getSourceMapSupportPkg() {
try {
return require.resolve('source-map-support/register');
} catch {
return undefined;
}
}
}

0 comments on commit d857d9b

Please sign in to comment.