Skip to content
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

与@vitejs/plugin-react@^4.0.0一起会报错,v4以下没有报错 #13

Open
leowang1028 opened this issue Jul 5, 2023 · 6 comments
Open

Comments

@leowang1028
Copy link

No description provided.

@leowang1028
Copy link
Author

image

@lishaobos
Copy link
Owner

能否提供可复现的 git 仓库,确保我能完全解决这个问题

@leowang1028
Copy link
Author

使用vite官方提供的模板即可,npm create vite@latest my-react-app -- --template react-ts
然后按你文档提供的方式配置,就会复现

@leowang1028
Copy link
Author

你的example中vite_react示例将vite和@vitejs/plugin-react更新到最新也会复现

@lishaobos
Copy link
Owner

好的,谢谢,我看看

@lishaobos
Copy link
Owner

lishaobos commented Jul 5, 2023

@leowang1028 你好,是因为 v4 版本删除了禁用 fastRefresh 的选项导致的错误,你可以参考下这个讨论 vitejs/vite-plugin-react#151 或者暂时恢复到 v3,等待 vite react 插件有好的解决方案

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants