-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack5: storybook blank with node_modules cache on second start #14152
Comments
Do you have a repro repo you can share? |
I wish I could share ours, unforunately ours is a private Github Enterprise project. I also see errors between Hot Module Reloading and our Mini CSS Extract Plugin on rebuilds within the first startup. Not sure if they're related to the secondary startup issue. Is there anyway to tweak the storybook manager cache settings with an option so I could try out multiple options and get more info? like I could do with this:
|
I had the chance to debug this some more today. When running the development build of storybook. It seems like the index.html file written to the
|
I figured it out. We are merging our webpack.config.js and the storybook one, and one of our plugins specifically the HTMLWebpackPlugin was overriding storybooks config. Our index.html file was being swapped into the storybook cache and storybook is looking for a div id="root" to put all it's bootstrapping information in. Removing our custom plugin from the merged webpack.config fixed the issue. |
Describe the bug
On first startup of the storybook, everything works correctly using webpack 5 resolutions according to the gist (and the additional gist configs). However on second startup for me, the page stays blank and doesn't render the manager. We noticed that if we delete the node_modules/.cache, the storybook works correctly again.
To Reproduce
Steps to reproduce the behavior:
Use 6.2.0-beta.9 of storybook
Start it up twice
Expected behavior
Continues to work after initial load
Screenshots
If applicable, add screenshots to help explain your problem.
Code snippets
Here's my babel-loader config
The storybook updates to support webpack5 in the manager build
System
Environment Info:
System:
OS: macOS 11.2.2
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Binaries:
Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
Browsers:
Chrome: 88.0.4324.192
Firefox: 86.0
Safari: 14.0.3
npmPackages:
@storybook/addon-a11y: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/addon-actions: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/addon-knobs: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/addon-links: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/addon-storyshots: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/addons: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/builder-webpack5: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/react: ^6.2.0-beta.9 => 6.2.0-beta.9
@storybook/theming: ^6.2.0-beta.9 => 6.2.0-beta.9
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: