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

[构建产物] 使用 vite 开发时,icon 会被 splitting 到多个文件,影响开发体验 #69

Closed
skywalker512 opened this issue Jul 16, 2023 · 2 comments
Assignees

Comments

@skywalker512
Copy link

skywalker512 commented Jul 16, 2023

tdesign-icons 版本

0.1.11

重现链接

none

重现步骤

  1. 在项目中 import tdesign-icons-vue-next/esm/index.js
  2. 启动 vite dev server
  3. chrome devtools 观察网络请求 或 项目中的 node_modules/.vite/deps 文件夹
  4. 有大量的 icon chunk 文件

相同的问题 Tencent/tdesign-vue-next#3079

期望结果

被正确的 bundle 为一个文件

实际结果

错误的 splitting 有大量的 icon chunk 文件

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

导致该问题的提交 #52

import('./components/${stem}')

会让 esbuild 认为是动态导入,进行 splitting

@github-actions
Copy link

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

@github-actions
Copy link

github-actions bot commented Jul 16, 2023

♥️ 有劳 @uyarn 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @skywalker512

@uyarn uyarn mentioned this issue Jul 17, 2023
16 tasks
@uyarn uyarn closed this as completed Jul 17, 2023
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