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

关于ant for vue cdn加载问题 #1966

Closed
1 task
bhabgs opened this issue Mar 27, 2020 · 4 comments
Closed
1 task

关于ant for vue cdn加载问题 #1966

bhabgs opened this issue Mar 27, 2020 · 4 comments
Labels

Comments

@bhabgs
Copy link

bhabgs commented Mar 27, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.4.12

Environment

mac: 10.15.2、 chrome: 80.0.3987.132、Vue:2.6.11

Reproduction link

#26

Steps to reproduce

当我想通过cdn的方式加载 ant 的时候,我使用了 <script src="https://unpkg.com/ant-design-vue@1.4.12/dist/antd.min.js"></script>public>index.html.

vue.confif.js 下配置如下

module.exports = {
// ...
configureWebpack: {
// ...
externals: {
vue: 'Vue',
'ant-design-vue': 'Ant',
'vue-router': 'VueRouter',
},
}
}

main.js 引入ant-design-vue

import Vue from 'vue';
import Ant from 'ant-design-vue';
console.log(Ant) // undefined

What is expected?

希望得到一个cdn引入的较好方案

What is actually happening?

cdn引入失败

@sendya
Copy link
Member

sendya commented Mar 27, 2020

vueComponent/ant-design-vue-pro@ae60814

@tangjinzhou
Copy link
Member

vue 也要通过cdn方式加载,然后组件会自动注册

@bhabgs
Copy link
Author

bhabgs commented Apr 8, 2020

感谢

@github-actions
Copy link

github-actions bot commented Apr 9, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants