mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 07:21:16 +08:00
Update hasDocsOrControls to account for new path
This commit is contained in:
parent
744051b9ea
commit
e9d30c89c8
@ -1,7 +1,7 @@
|
||||
import type { Options } from '@storybook/types';
|
||||
|
||||
// `addons/x` is for the monorepo, `addon-x` is for normal usage
|
||||
const packageRe = /(addons\/|addon-)(docs|controls)/;
|
||||
const packageRe = /(addons\/|addon-|addon-essentials\/)(docs|controls)/;
|
||||
|
||||
export const hasDocsOrControls = (options: Options) =>
|
||||
options.presetsList?.some((preset) => packageRe.test(preset.name));
|
||||
|
Loading…
x
Reference in New Issue
Block a user