diff --git a/.hooks/plugin-warning-logger.js b/.hooks/plugin-warning-logger.js index 2e9a35e5144..b7ed7ff4f34 100644 --- a/.hooks/plugin-warning-logger.js +++ b/.hooks/plugin-warning-logger.js @@ -16,7 +16,9 @@ module.exports = { } }, wrapScriptExecution(executor, project, locator, scriptName) { - if (scriptName === 'build' && !process.env.CI) { + const workspace = project.getWorkspaceByLocator(locator); + const isTopLevelWorkspace = workspace.relativeCwd === '.'; + if (isTopLevelWorkspace && scriptName === 'build' && !process.env.CI) { return async () => { const status = await executor() console.warn('\x1b[1m' /* bold */ + '╔'.padEnd(79, '═') + '╗')