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

🐛 [Bug]: [@opentiny/vue-icon] 使用图标时,构建逻辑异常 #2564

Open
smallseapig opened this issue Nov 27, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@smallseapig
Copy link

Version

latest

Vue Version

latest

Link to minimal reproduction

[@opentiny/vue-icon] 构建时会解析成多行,注释的时候逻辑有问题

代码片段

构建后代码

Step to reproduce

  1. 启动一个普通的 vite 项目,导入 @opentiny/vue-icon,本地启动
  2. 注释一段代码:// import { iconDownload, iconPushpin, iconClose } from "@opentiny/vue-icon";

What is expected

  • 查看构建后的代码:
// import iconDownload from '@opentiny/vue-icon/lib/download.js'
import iconPushpin from "/node_modules/.vite/deps/@opentiny_vue-icon_lib_pushpin__js.js?v=ac340d00"
import iconClose from "/node_modules/.vite/deps/@opentiny_vue-icon_lib_close__js.js?v=ac340d00"

What is actually happening

  • 希望构建后的代码:
// import iconDownload from '@opentiny/vue-icon/lib/download.js'
// import iconPushpin from "/node_modules/.vite/deps/@opentiny_vue-icon_lib_pushpin__js.js?v=ac340d00"
// import iconClose from "/node_modules/.vite/deps/@opentiny_vue-icon_lib_close__js.js?v=ac340d00"

What is your project name

@opentiny/vue-icon

Any additional comments (optional)

No response

@kagol kagol added the bug Something isn't working label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants