tdesign-react icon indicating copy to clipboard operation
tdesign-react copied to clipboard

[Form] 导致打包体积过大

Open FireBushtree opened this issue 2 years ago • 4 comments

tdesign-react 版本

1.3.1

重现链接

https://github.com/FireBushtree/weight-control

重现步骤

Form 组件的 useInitialData.ts 文件中引入了其他组件,用来初始化表单的值。 image 导致打包后,我在项目中没有使用 RangeInput 等组件,但是它们的代码还是被打包进项目了。 image

期望结果

在未使用RangeInput 等组件的情况下,能够成功tree-shaking

实际结果

没有使用的组件,也被打包了

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

FireBushtree avatar Nov 23 '23 09:11 FireBushtree

👋 @FireBushtree,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

github-actions[bot] avatar Nov 23 '23 09:11 github-actions[bot]

♥️ 有劳 @ximendatie @cuijinyu @BaoTao1997 @yume316 @honkinglin 尽快确认问题。 确认有效后将下一步计划和可能需要的时间回复给 @FireBushtree 。

github-actions[bot] avatar Nov 23 '23 09:11 github-actions[bot]

这个问题有进展了么

Except10n avatar Apr 03 '24 09:04 Except10n

这个问题有进展了么

这个讨论看怎么优化才行

HaixingOoO avatar Apr 03 '24 12:04 HaixingOoO