babel-plugin-import
babel-plugin-import copied to clipboard
引入组件将icon全部加载进来了,无法按需加载
使用ts时根据Issues里面的建议,发现配置完后随便加载一个组件就500多kb,经过多方查询发现是把icon给加载进来了,完全没用到就白白多500多Kb,这个要怎么解决
tsconfig.json部分配置
webpack.config.js部分配置
期望按需加载,但是实际只要引入跟icon有关的组件都是500多Kb,太大了
typescript: 3.1 antd: 3.13.6 webpack: 4.29.5
purched-antd-icons u need this.
@willylee007 how can i use this? I`m try,but it does not work
用了一下这个purched-antd-icons, 还是有点问题。 部分图标没导入
原来你用了ts。 你应该去ts-import-plugin留issue的。
ts-import-plugin的issue我看了一圈 没解决问题...现在在用Material, 有点难用 0 0!
后来我在新工程用了这个脚手架react-scripts-ts-antd, 新工程还不用剔除Icon 旧工程用这个剔除Antd里的Icon purched-antd-icons, 部分没有的Icon用iconfont的图标替换, 完美解决
多谢推荐,我周末试下 @willylee007