-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Documentation of precautions when using Vite #18399
Comments
Thanks for bringing this up, @yogarasu. I'm writing up a Edit: PR is up at storybookjs/builder-vite#405, if you'd be so kind as to review to see if I missed anything. |
@IanVS I don't think there is any particular reason to install the packages individually, so in the future it would be nice if the mdx package that suits your environment is automatically installed. I will check the review. |
For sure, it's definitely a bug (storybookjs/builder-vite#391). It's due to react 18 and mdx2 and the mdx plugin we're using, etc. We're working on it in storybookjs/builder-vite#377, which I hope will solve that issue. |
@IanVS |
@IanVS |
See storybookjs/storybook#18399 We don't need this at the moment, but I discovered this while looking into another Storybook issue, and it seems worth adding now in case we use Jest in the future, as it is not well documented. (Also, it sounds like Storybook projects created with recent versions will automatically add this file.)
See the following issues: - storybookjs/storybook#18399 - storybookjs/storybook#15391
See the following issues: - storybookjs/storybook#18399 - storybookjs/storybook#15391
See the following issues: - storybookjs/storybook#18399 - storybookjs/storybook#15391
See the following issues: - storybookjs/storybook#18399 - storybookjs/storybook#15391
See the following issues: - storybookjs/storybook#18399 - storybookjs/storybook#15391
I'm new to Storybook, but when using it with Vite, I had the following two problems, and I wasted a day with the latter problem.
@mdx-js/xxxxx
package.The global is not defined error can can be avoided by adding the preview-head.html file and adding the following code.
Seems to be due to the jest-mock package used inside the
@storybook/addon-interactions
add-on.#17516
I couldn't find a description of these issues in the official documentation, but I can't use the Storybook without addressing these issues.
I was confused because
@storybook/addon-interactions
was omitted without explanation in the Vite section of the official docs, even though it was the default add-on.https://storybook.js.org/docs/react/builders/vite
I will pull request if I have time, but please let me know if my understanding is wrong.
The text was updated successfully, but these errors were encountered: