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

react18支持 #12

Open
DroganC opened this issue Dec 4, 2022 · 7 comments
Open

react18支持 #12

DroganC opened this issue Dec 4, 2022 · 7 comments

Comments

@DroganC
Copy link

DroganC commented Dec 4, 2022

amis这边能够支持react18了
cli这边近期能否支持到react18

@DroganC
Copy link
Author

DroganC commented Dec 4, 2022

antd5现在使用css in js,在cli中报css引入的问题
这个能够解决吗

@wleven
Copy link
Contributor

wleven commented Dec 5, 2022

antd5现在使用css in js,在cli中报css引入的问题 这个能够解决吗

碰到了同样的问题,这个是上层依赖akfun的问题。akfun内置了antd之前的按需加载方式 所以在antd5会有问题。暂时用 pnpm patch akfun 修改babel配置解决了。不清楚这块作者有没有计划去调整

akfun作为构建工具内置UI库的按需加载是否有些不太合理。或者开放babel的配置支持项目内自行修改

@wleven
Copy link
Contributor

wleven commented Dec 5, 2022

https://github.com/wibetter/akfun/pull/13

@DroganC
Copy link
Author

DroganC commented Dec 7, 2022

https://github.com/wibetter/akfun/pull/13

更新cli到3.0.2我取消了antd的按需引入 但是yarn dev模式启动特别慢

@wleven
Copy link
Contributor

wleven commented Dec 8, 2022

https://github.com/wibetter/akfun/pull/13

更新cli到3.0.2我取消了antd的按需引入 但是yarn dev模式启动特别慢

那就不清楚了 我用的pnpm 没觉得很慢

@DroganC
Copy link
Author

DroganC commented Dec 8, 2022

https://github.com/wibetter/akfun/pull/13

更新cli到3.0.2我取消了antd的按需引入 但是yarn dev模式启动特别慢

那就不清楚了 我用的pnpm 没觉得很慢

你能贴一段import的babelPlugins配置吗

@wleven
Copy link
Contributor

wleven commented Dec 8, 2022

https://github.com/wibetter/akfun/pull/13

更新cli到3.0.2我取消了antd的按需引入 但是yarn dev模式启动特别慢

那就不清楚了 我用的pnpm 没觉得很慢

你能贴一段import的babelPlugins配置吗

只是移除了babel第一个antd的配置

  // amis.config.js
  webpack: {
    //...
    babelPlugins(arr) {
      arr.shift();
    }
    //...
  },

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