Resolve renderer as an addon

This commit is contained in:
Tom Coleman 2022-10-25 13:05:33 +11:00
parent 2310757acc
commit 031a39f8fc
2 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@ import {
cache,
loadMainConfig,
validateFrameworkName,
resolveAddonName,
} from '@storybook/core-common';
import prompts from 'prompts';
import global from 'global';
@ -90,7 +91,7 @@ export async function buildDevStandalone(options: CLIOptions & LoadOptions & Bui
require.resolve('./presets/common-preset'),
...(managerBuilder.corePresets || []),
...(previewBuilder.corePresets || []),
...(renderer ? [renderer] : []),
...(renderer ? [resolveAddonName(options.configDir, renderer, options)] : []),
...corePresets,
require.resolve('./presets/babel-cache-preset'),
],

View File

@ -20,6 +20,7 @@ import {
normalizeStories,
logConfig,
loadMainConfig,
resolveAddonName,
} from '@storybook/core-common';
import { outputStats } from './utils/output-stats';
@ -84,7 +85,7 @@ export async function buildStaticStandalone(
require.resolve('./presets/common-preset'),
...(managerBuilder.corePresets || []),
...(previewBuilder.corePresets || []),
...(renderer ? [renderer] : []),
...(renderer ? [resolveAddonName(options.configDir, renderer, options)] : []),
...corePresets,
require.resolve('./presets/babel-cache-preset'),
],