Open HotariTobu opened 10 months ago
It seems any external file components cause.
Also seeing this error when trying to get setup using ShadCN + Tailwind inside of an NX monorepo.
As soon as I try and render a component I get the React Refresh runtime was loaded twice error
I avoid the issue by using @vitejs/plugin-react
instead of @vitejs/plugin-react-swc
.
However, I want to use swc version if possible.
@vitejs/plugin-react
is a quick workaround you can use as a drop in replacement, but @HotariTobu is right. Maybe swap the default to @vitejs/plugin-react
until this problem is addressed @aklinker1
Summary
I created a project with the plugin's template. After I added tailwindcss and shadcn/ui, the popup component made not to be rendered.
How can I use both the plugin and shadcn/ui?
Reproduction
https://github.com/HotariTobu/vite-web-ext-shadcn
To be exact, the error occurs when tsx including a shadcn/ui component. The problem doesn't happen if we don't use a component by doing comment-out etc like below;
Environment
Terminal log 👇
Console log 👇