Skip to content

Add previewMainTemplate option to StorybookConfig interface#21620

Merged
ndelangen merged 2 commits into
storybookjs:nextfrom
esilverm:fix/previewMainTemplate-in-storybook-config-type
Mar 22, 2023
Merged

Add previewMainTemplate option to StorybookConfig interface#21620
ndelangen merged 2 commits into
storybookjs:nextfrom
esilverm:fix/previewMainTemplate-in-storybook-config-type

Conversation

@esilverm

Copy link
Copy Markdown
Contributor

Closes #21579

What I did

Updated the StorybookConfig interface to include the previewMainTemplate option because otherwise it would give a typescript error if users tried to include this valid config option.

How to test

  1. Modify main.ts in ui/.storybook to include the previewMainTemplate option. The default one here could work as an example value for this option.
  2. Adding this option should not give a typescript error.
  3. Start the storybook dev server
  4. All stories should load properly within the new preview template.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@Philzen

Philzen commented Dec 25, 2024

Copy link
Copy Markdown

How would this feature work with vite (which is the default bundler from Storybook v7 on i understand)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: StorybookConfig type doesn't include previewMainTemplate option

4 participants