Skip to content

Commit

Permalink
fix(js): sourcemaps should work with js:node executor (#17261)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored May 29, 2023
1 parent 7dd8fb6 commit f01cdca
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/js/src/executors/node/node.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ export async function* nodeExecutor(
task.promise = new Promise<void>((resolve, reject) => {
task.childProcess = fork(
joinPathFragments(__dirname, 'node-with-require-overrides'),
getExecArgv(options),
options.runtimeArgs ?? [],
{
execArgv: getExecArgv(options),
stdio: [0, 1, 'pipe', 'ipc'],
env: {
...process.env,
Expand Down Expand Up @@ -230,11 +231,7 @@ export async function* nodeExecutor(
}

function getExecArgv(options: NodeExecutorOptions) {
const args = [
'-r',
require.resolve('source-map-support/register'),
...options.runtimeArgs,
];
const args = ['-r', require.resolve('source-map-support/register')];

if (options.inspect === true) {
options.inspect = InspectType.Inspect;
Expand Down

1 comment on commit f01cdca

@vercel
Copy link

@vercel vercel bot commented on f01cdca May 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.