When I follow the steps described here https://storybook.js.org/blog/storybook-for-vite/ to create a new project with storybook everything works fine (React & react dom) as dependencies in package.json.
But when I try to make React & react dom a peerDependency in package.json compilation fails and no components are shown in the story.
What version of
vite
are you using?3.2.0
System info and storybook versions
Environment Info:
System: OS: Windows 10 10.0.19042 CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics Binaries: Node: 16.12.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (107.0.1418.35) npmPackages: @storybook/addon-actions: ^6.5.13 => 6.5.13 @storybook/addon-essentials: ^6.5.13 => 6.5.13 @storybook/addon-interactions: ^6.5.13 => 6.5.13 @storybook/addon-links: ^6.5.13 => 6.5.13 @storybook/builder-vite: ^0.2.5 => 0.2.5 @storybook/react: ^6.5.13 => 6.5.13 @storybook/testing-library: ^0.0.13 => 0.0.13
Describe the Bug
When I follow the steps described here https://storybook.js.org/blog/storybook-for-vite/ to create a new project with storybook everything works fine (
React
&react dom
) as dependencies inpackage.json
.But when I try to make
React
&react dom
apeerDependency
inpackage.json
compilation fails and no components are shown in the story.Working:
Failing:
Thanks in advance.
Why you ask? Wanna build a component library and the import of the lib will already have
React
&react dom
installed.Link to Minimal Reproducible Example
No response
Participation