Skip to content

Commit

Permalink
fix(generate-presets): use commonPreset in getAllPresets
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Apr 22, 2022
1 parent c499b59 commit a644602
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/core-common/src/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,15 @@ export function loadAllPresets(options: LoadPresetOptions) {
}

export const getAllPresets = async (configDir: string) => {
const commonPreset = require.resolve('@storybook/core-server/dist/cjs/presets/common-preset');
const presets = loadAllPresets({
configDir,
corePresets: [commonPreset],
} as LoadPresetOptions);

const addonPresets = await presets.apply('previewAnnotations', [], { configDir });
const addonPresets = await presets.apply('config', [], {
configDir,
});
const configs = [
// load addon presets
...addonPresets,
Expand Down

0 comments on commit a644602

Please sign in to comment.