create-chrome-ext
create-chrome-ext copied to clipboard
[BugReport] vite ws connect failed
when i use create-chrome-ext with react + ts + vite, after install dependencies and run npm run dev, it comes with websockets connect failed:
I had this error too, - looks like Vite regression or a configuration issue. Some people report that downgrading to "vite": "~4.2.2" helped them.
For me, adding Vite configuration from this answer solved the issue. Hope this helps!
@Valeriy-Burlaka thks, after donwgrade vite, it works, and the hmr as well 👍
@guocaoyi maybe should lock version of vite or add this problem in FAQ
same problem
Try add this to your vite config
server: { port: 5173, strictPort: true, hmr: { port: 5173, }, },
fixed!
This bug only in dev.