Skip to content

Commit

Permalink
Merge pull request #2630 from micalevisk/fix-issue-2629
Browse files Browse the repository at this point in the history
feat: replace 'source-map-support' with nodejs native source mapping binding
  • Loading branch information
kamilmysliwiec authored Jul 5, 2024
2 parents d87405a + b5dba00 commit 682e7dd
Show file tree
Hide file tree
Showing 3 changed files with 321 additions and 68 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;
}
}
}
Loading

0 comments on commit 682e7dd

Please sign in to comment.