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

能否将react版本升级到18.2.0 #31

Closed
cstongwei opened this issue Jan 21, 2024 · 4 comments
Closed

能否将react版本升级到18.2.0 #31

cstongwei opened this issue Jan 21, 2024 · 4 comments

Comments

@cstongwei
Copy link

我是前端小白,将版本升级后各种依赖问题搞不定。能帮忙出个react 18.2.0的版本嘛?

@iceqing
Copy link
Owner

iceqing commented Jan 27, 2024

您好,已经升级到了react18,代码已经提交到了dev_react18分支, 因为升级版本过大,需要一段时间测试,暂时没有合并到主干分支(vite和webpack分支)

https://github.com/iceqing/react-amis-admin/tree/dev_react18

@cstongwei
Copy link
Author

谢谢大佬。我学习下。有没有群之类的可以交流呀

@cstongwei
Copy link
Author

大佬,react18的版本能否加个调试的代理配置,解决跨域问题。原来在你这个项目的react16版本上工作的好好的代理配置,换到这个react18的版本就不行了。
代理配置写在vite.config.js里。具体如下:
server: {
port: 4000,
host: "localhost",
open: "/",
proxy: {
'/admin': {
target: 'https://api.xxxxx.com',
changeOrigin: true,
rewrite: (path) => {
return path
}
}
}
},

报错信息如下:
image

@cstongwei
Copy link
Author

没事了,mock忘记注释掉了。

@iceqing iceqing closed this as completed Feb 4, 2024
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