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

Support multiple libraries #50

Merged
merged 2 commits into from
Aug 8, 2016
Merged

Support multiple libraries #50

merged 2 commits into from
Aug 8, 2016

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented Aug 8, 2016

Close #41
Close ant-design/ant-design-mobile#17


改动:

  1. 支持多个 library, 写死 antdantd-mobile
  2. 不再支持之前的 libraryName 参数,应该不需要了

TODO:

  • 补充用例

@sorrycc sorrycc merged commit c9e98de into master Aug 8, 2016
@sorrycc sorrycc deleted the multiple-library branch August 8, 2016 08:02
@afc163
Copy link
Contributor

afc163 commented Aug 8, 2016

libraryName 还是要保留。。。内部还有 alipayui 这样的上层库也要用到。

@sorrycc
Copy link
Member Author

sorrycc commented Aug 8, 2016

alipayui 是怎么用 babel-plugin-antd 的? 引 core.js 自己封装?

@afc163
Copy link
Contributor

afc163 commented Aug 8, 2016

最好这样。

['antd', [{
  libraryName: 'antd',
  libraryDirectory: 'lib'
}, {
  libraryName: 'antd-mobile',
  libraryDirectory: 'lib'
}]]

@afc163
Copy link
Contributor

afc163 commented Aug 8, 2016

alipayui 的项目结构和使用方式和 antd-mobile 是一样的,有通用组件和业务组件要按需使用。

@sorrycc
Copy link
Member Author

sorrycc commented Aug 8, 2016

lib 目录为什么要可配?

antd 应该内置吧,不需要额外加配置引入。配置改成这样?

['antd', {
  extraLibraries: ['antd-mobile', 'alipayui']
}]

@afc163
Copy link
Contributor

afc163 commented Aug 8, 2016

https://github.com/ant-design/ant-design-mobile/blob/master/site/bisheng.config.js#L43

典型需求就是站点开发的时候支持 components,同时站点引入 antd/lib/xxx

@sorrycc
Copy link
Member Author

sorrycc commented Aug 8, 2016

想了想,还是按你的建议来做配置。

@sorrycc
Copy link
Member Author

sorrycc commented Aug 8, 2016

已在 #52 实现。

@dazjean
Copy link

dazjean commented Apr 2, 2019

已在 #52 实现。

支持多个 library,是写死的antd 和 antd-mobile吗??????

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

Successfully merging this pull request may close these issues.

3 participants