diff --git a/core/cli/src/config.ts b/core/cli/src/config.ts index 9eab24e9d..e56d24d4f 100644 --- a/core/cli/src/config.ts +++ b/core/cli/src/config.ts @@ -96,7 +96,7 @@ export function validateConfig(config: ValidPluginsConfig): ValidConfig { const unusedPluginOptions = Object.entries(config.pluginOptions) .filter( ([, option]) => - option && !isConflict(option) && !option.forPlugin && option.plugin.root === process.cwd() + option && !isConflict(option) && !option.forPlugin && option.plugin.root === config.root ) .map(([id]) => id) @@ -107,7 +107,7 @@ export function validateConfig(config: ValidPluginsConfig): ValidConfig { const unusedTaskOptions = Object.entries(config.taskOptions) .filter( - ([, option]) => option && !isConflict(option) && !option.task && option.plugin.root === process.cwd() + ([, option]) => option && !isConflict(option) && !option.task && option.plugin.root === config.root ) .map(([id]) => id) diff --git a/core/cli/src/plugin.ts b/core/cli/src/plugin.ts index 4b7101d8d..3e4453497 100644 --- a/core/cli/src/plugin.ts +++ b/core/cli/src/plugin.ts @@ -37,7 +37,7 @@ export async function loadPlugin( const isAppRoot = id === 'app root' // load plugin relative to the parent plugin - const root = parent ? parent.root : process.cwd() + const root = parent ? parent.root : config.root const pluginRoot = isAppRoot ? root : resolveRoot(id, root) if (!pluginRoot) { return invalid([`could not find path for name ${s.filepath(id)}`])