-
-
Notifications
You must be signed in to change notification settings - Fork 12
Doesn't work with react-scripts 5 (Webpack 5) #14
Comments
Got the same issue here, i also tried to add :
The
In addition, |
My guess is that the root cause is that this package relies on directly requiring helpers from the dist folder of A quick and dirty workaround that I implemented was to create a specific storybook craco config and just live without the My Solution
|
Thanks for the workaround @jdt3969 . I have now updated my sample repo to contain your suggested fix in the "workaround" branch. After applying your changes, storybook is now stuck at a "spinner" loading state. |
I need to find some time to work out why it doesn't work with the new storybook but it's not currently affecting me and my free time is limited so it's not high on my priority list atm, if someone wants to find a clean solution and PR I will merge but for now it will have to wait till I'm less busy. |
@kumikumi Pulled your example repo and got the
(Using the github link to this project because the most recent changes haven't been published to npm) |
Summary: try Check you version of To fix this: install the latest version ( |
Description
Here's a sample repo with react-scripts 5. Storybook works with
"@storybook/preset-create-react-app"
but doesn't work after swapping it to"storybook-preset-craco"
Expected behavior
yarn storybook
makes storybook build successfully.Actual behavior
Get lots of errors like this:
Steps to Reproduce
Sample repo https://github.com/kumikumi/storybook-craco-react-scripts-webpack5
Your environment
node.js version v17.8.0
The text was updated successfully, but these errors were encountered: