Skip to content

Commit

Permalink
Merge pull request #19624 from storybookjs/tom/sb-879-fix-v6-angulare…
Browse files Browse the repository at this point in the history
…mber-support

Ensure v6 store works even with no explicit renderer
tmeasday authored Oct 26, 2022
2 parents a578aa7 + 1c91324 commit 82e91db
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions code/lib/core-common/src/utils/get-renderer-name.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { dedent } from 'ts-dedent';
import type { Options } from '@storybook/types';
import { getFrameworkName } from './get-framework-name';

/**
* Render is set as a string on core. It must be set by the framework
@@ -8,11 +8,9 @@ export async function getRendererName(options: Options) {
const { renderer } = await options.presets.apply('core', {}, options);

if (!renderer) {
throw new Error(dedent`
You must specify a framework in '.storybook/main.js' config.
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory
`);
// At the moment some frameworks (Angular/Ember) do not define a renderer, but themselves
// serve the purpose (in particular exporting the symbols needed by entrypoints)
return getFrameworkName(options);
}

return renderer;

0 comments on commit 82e91db

Please sign in to comment.