vitejs / vite-plugin-react-swc

Speed up your Vite dev server with SWC
MIT License
863 stars 58 forks source link

Storybook test not working with vitest with react-swc plugin #244

Open jainaks01-bh opened 6 days ago

jainaks01-bh commented 6 days ago

First of all, Lots of gratitude for working on these plugins, I am not able to devote time to fix, atleast I can raise an issue, that I faced

I have created this issue in storybook, when I was not able to run the component tests with storybook 8.4.2, the error is mentionedin below issue

https://github.com/storybookjs/storybook/issues/29602

When I replaced, @vitejs/plugin-react-swc with @vitejs/plugin-react

I am able to run the component tests. so may be the issue is with this plugin's compilation, so raising it here.

Thank you so much!

hi-ogawa commented 5 days ago

Can you try barebone Vitest browser mode https://vitest.dev/guide/browser/#browser-option-types? It could be a issue with browser mode in general and debugging storybook integration is normally out of our hand.

jainaks01-bh commented 5 days ago

Thank you Hiroshi, I will check and update