use --prod instead of env-variable
This commit is contained in:
parent
564c0d2b90
commit
e2251c14dc
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ function selectYarnDependencies(deps: YarnDependency[], entries: string[]): Yarn
|
|||
}
|
||||
|
||||
async function getYarnProductionDependencies(cwd: string): Promise<YarnDependency[]> {
|
||||
const raw = await new Promise<string>((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<string>((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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue