const startPlugin = async function({ buildDir, nodePath, childEnv, package, pluginPackageJson, loadedFrom, pluginDir, mode, spawnInfo, userNodeVersion, }) { const { childNodePath, childNodeVersion } = getChildNodePath({ loadedFrom, nodePath, userNodeVersion, mode }) await checkNodeVersion({ childNodeVersion, package, pluginPackageJson }) const childProcess = execa.node(CHILD_MAIN_FILE, { cwd: buildDir, preferLocal: true, localDir: pluginDir, nodePath: childNodePath, execPath: childNodePath, env: childEnv, extendEnv: false, }) await getEventFromChild(childProcess, 'ready', spawnInfo) return { childProcess } }
const startPlugin = async function({ buildDir, nodePath, childEnv, package, pluginPackageJson, loadedFrom, pluginDir, mode, spawnInfo, userNodeVersion, }) { const { childNodePath, childNodeVersion } = getChildNodePath({ loadedFrom, nodePath, userNodeVersion, mode }) await checkNodeVersion({ childNodeVersion, package, pluginPackageJson }) const childProcess = execa.node(CHILD_MAIN_FILE, { cwd: buildDir, preferLocal: true, localDir: pluginDir, nodePath: childNodePath, execPath: childNodePath, env: childEnv, extendEnv: false, }) await getEventFromChild(childProcess, 'ready', spawnInfo) return { childProcess } }