fix: spawn scripts with node, fix modern mode with Yarn 2 (Berry) (#5320)

See https://github.com/yarnpkg/berry/issues/964#issuecomment-587425891
This commit is contained in:
Haoqun Jiang
2020-03-27 17:02:23 +08:00
committed by GitHub
parent f1bdf7319a
commit ebcee9a32c

View File

@@ -62,7 +62,7 @@ module.exports = (api, options) => {
// spawn sub-process of self for modern build
const { execa } = require('@vue/cli-shared-utils')
const cliBin = require('path').resolve(__dirname, '../../../bin/vue-cli-service.js')
await execa(cliBin, ['build', ...rawArgs], {
await execa('node', [cliBin, 'build', ...rawArgs], {
stdio: 'inherit',
env: {
VUE_CLI_MODERN_BUILD: true