-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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 Report] vant cli 6.0 组件使用script setup进行开发 build指令打包后没有导出组件 #12729
Labels
Comments
我找到了 #10741 这条issue 但我不确定是不是同样的问题 而且当年的版本应该比较低 |
vant/packages/vant-cli/src/common/index.ts Lines 27 to 29 in 41fb2cc
是因为这里判断了是不是默认导出 @chenjiahan 我们要不要在这里加上defineOptions定义name名字,因为现在是支持宏的 `<script setup> defineOptions({ name: 'DemoButton' }) |
嗯嗯,可以加一下判断 |
辛苦辛苦 |
@chenjiahan 佳涵哥 这个什么时候发版 如果短期不准备发的话 我先fork过去自己发一个用着哦 |
@chenjiahan 佳涵哥 cli什么时候发版呀 |
短期没计划,你可以先 fork 哈 ❤️ |
好的 辛苦 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
重现链接
https://github.com/wangKBweb/vant-cli-test
Vant 版本
@vant/cli 6.0
描述一下你遇到的问题。
组件开发使用script setup
build指令打包无法正常导出组件
重现步骤
yarn create vant-cli-app
project-name: xxx
vue3
less
yarn下载依赖
yarn build
此时打包发现 es/index.js 中是正常的
修改 src/demo-button/index.vue
删除export default
更改为script setup
yarn build
此时es/index.js中已经缺失了demo-button的引入与导出
设备/浏览器
No response
The text was updated successfully, but these errors were encountered: