Support for storybook v6.5.9 and v7 syntax
adambullmer opened this issue · 0 comments
Describe the bug
This probably also merits a fix to figure out if @storybook/core/server
or @storybook/core-server
is available as a dependency to require. The relevant dummy patch has been added to the reproduction steps.
I expect this to be an issue with bleeding edge use cases, but believe this will be a bigger problem when storybook releases their first V7 release. Using the new-ish storyStoreV7
feature flag while using this vue-cli plugin isn't yielding a running storybook server. The builder will succeed, however the storybook preview window will have the following full screen error:
Expected your framework's preset to export a \`renderToDOM\` field.
Perhaps it needs to be upgraded for Storybook 6.4?
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field
Steps to reproduce the behavior
- Setup fresh project with this vue-cli plugin
- Ensure first party vue-cli plugin versions are all below v5 (5+ will require webpack 5) (this may also require deleting the scaffolded vue.config.js file that was created for vue-cli 5+)
- Upgrade storybook and storybook plugin versions to
6.5.9
- Make patch to this item's
lib/index.js
to import@storybook/core-server
instead of@storybook/core/server
- Add to your
storybook/main.js
config the following root level optionfeatures: { storyStoreV7: true, buildStoriesJson: true }
- Run the
storybook:serve
command - Observe error in storybook preview window
Expected behavior
I expect the storybook site to be able to successfully run the storybook server.
Screenshots and/or logs
n/a, Whole error text has been copied in description
Environment
- OS: MacOS Monterey v12.4
- Node.js version: v14.20.0
- Yarn version: v3.2.2
- Vue version: v2.6.14
Additional context
Storybook Feature Flags documented here: https://storybook.js.org/docs/react/configure/overview#feature-flags