Skip to content
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

Infinite Loading when using Storybook with Vite #270

Closed
MatheusMoselli opened this issue Mar 4, 2022 · 4 comments
Closed

Infinite Loading when using Storybook with Vite #270

MatheusMoselli opened this issue Mar 4, 2022 · 4 comments

Comments

@MatheusMoselli
Copy link

I already used Storybook with CRA, and it worked fine, but when I try to use when Vite it get stuck in infinite loading. The project runs without problems with the command npm run storybook, but nothing appears on the screen.

I'm using a React-App with typescript

I think the error has something to do with the module.exports in the storybook file, since I can't use module.exports for .eslint.js
image

PS: There is an error in the console, too.
image

@IanVS
Copy link
Member

IanVS commented Mar 4, 2022

@MatheusMoselli thanks for reporting this. It seems to be coming from the manager (webpack) portion of storybook. Are you able to share a reproduction by any chance, so that I can look into it?

@MatheusMoselli
Copy link
Author

Of course! Sorry for the late reply, I was a little busy.
But here it goes:
https://github.com/MatheusMoselli/storybook-vite

@lgarest
Copy link

lgarest commented Mar 5, 2022

I had the same issue with the infinite loading screen but a different error in the console about Uncaught SyntaxError: import not found: ModuleMocker
screenshot
I could fix it with #242 (comment)

@MatheusMoselli
Copy link
Author

Yeah, this is is the error that appears when I open the storybook in the firefox.
The workaround worked thanks 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants