diff --git a/src/npm.ts b/src/npm.ts index 0b7201c..e21a9a4 100644 --- a/src/npm.ts +++ b/src/npm.ts @@ -149,7 +149,7 @@ function selectYarnDependencies(deps: YarnDependency[], entries: string[]): Yarn } async function getYarnProductionDependencies(cwd: string): Promise { - const raw = await new Promise((c, e) => cp.exec('yarn list --json', { cwd, encoding: 'utf8', env: { ...process.env, NODE_ENV: 'production' } }, (err, stdout) => err ? e(err) : c(stdout))); + const raw = await new Promise((c, e) => cp.exec('yarn list --prod --json', { cwd, encoding: 'utf8', env: { ...process.env } }, (err, stdout) => err ? e(err) : c(stdout))); const match = /^{"type":"tree".*$/m.exec(raw); if (!match || match.length !== 1) {