Update hasDocsOrControls to account for new path

This commit is contained in:
Ian VanSchooten 2022-11-04 14:36:14 -04:00
parent 744051b9ea
commit e9d30c89c8

View File

@ -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));