x-render
x-render copied to clipboard
不能 treeshaking
1.依赖仓库的版本(Dependencies versions):
- react:18
- form-render:1.13.14
- antd:4.23.1
2.问题描述(Bug description):
引入 form-render 包不会自动 treeshaking,并且会导致antd、lodash-es 等都全量加载
3.最小复现 demo(Reproduction demo): https://github.com/zwmmm/form-render-test 直接npm run build 查看打包后文件
配置 babel-plugin-import 试试:https://github.com/umijs/babel-plugin-import
是让我用 babel-plugin-import 解决 antd 的问题 还是说 form-render 也支持配置 babel-plugin-import
用babel-plugin-import 解决 lodash和antd的打包问题
你装 [email protected] 版本试试,体积应该小了很多
没有任何区别
年后会上线一个性能优化之后的版本,可以等一等。