You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
$ yarn dev
yarn run v1.22.19
$ vite
Build Steps
1. Building src/popup.html indvidually
2. Building src/background.ts indvidually
VITE v5.0.12 ready in 568 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
Building src/popup.html (1/2)
vite v5.0.12 building for development...
✓ 5 modules transformed.
23:01:15 [vite] page reload dist/src/popup.html
23:01:15 [vite] page reload dist/src/popup.html (x2)
dist/src/popup.html 0.57 kB │ gzip: 0.33 kB
dist/src/popup.js 2.25 kB │ gzip: 1.05 kB
✓ built in 402ms
Building src/background.ts (2/2)
vite v5.0.12 building for development...
watching for file changes...
build started...
✓ 4 modules transformed.
dist/src/background.js 10.01 kB │ gzip: 2.98 kB
built in 162ms.
✓ Wrote manifest.json
Opening browser...
Done!
Console log 👇
Uncaught Error: React refresh runtime was loaded twice. Maybe you forgot the base path?
at refresh-runtime.js?v=668d75ce:368:9
The text was updated successfully, but these errors were encountered:
@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 👇
The text was updated successfully, but these errors were encountered: