From ccc5ffc502bb8f0311d11d8adc601a8cd16ca94c Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 14 Mar 2022 01:43:33 +0800 Subject: [PATCH] Remove logging from hasDocsOrControls Causes cryptic webpack error in angular-cli example --- lib/docs-tools/src/hasDocsOrControls.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/docs-tools/src/hasDocsOrControls.ts b/lib/docs-tools/src/hasDocsOrControls.ts index 299f4785459..0e1dc107093 100644 --- a/lib/docs-tools/src/hasDocsOrControls.ts +++ b/lib/docs-tools/src/hasDocsOrControls.ts @@ -1,15 +1,7 @@ import type { StorybookConfigOptions } from '@storybook/core-common'; -import { once } from '@storybook/node-logger'; // addons/x is for the monorepo const packageRe = /addon(s\/|-)(docs|controls)/; -export const hasDocsOrControls = (options: StorybookConfigOptions) => { - const found = options.presetsList?.some((preset) => packageRe.test(preset.name)); - if (!found) { - once.verbose( - `No docs or controls found in presets: ${options.presetsList?.map((preset) => preset.name)}` - ); - } - return found; -}; +export const hasDocsOrControls = (options: StorybookConfigOptions) => + options.presetsList?.some((preset) => packageRe.test(preset.name));