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

Add suffix option #116

Closed
cncolder opened this issue Feb 18, 2017 · 7 comments · Fixed by #159
Closed

Add suffix option #116

cncolder opened this issue Feb 18, 2017 · 7 comments · Fixed by #159
Assignees

Comments

@cncolder
Copy link
Contributor

If you add a suffix option like this. Maybe this can save time for antd-mobile users

{
    "libraryName": "antd-mobile",
    "suffix": "/index.web",
}

Then transform import { Button } from 'antd-mobile' to var _button = require('antd-mobile/lib/button/index.web')

@yesmeck
Copy link
Contributor

yesmeck commented Mar 2, 2017

@sorrycc 觉得如何,我也碰到需要能指定 index 文件的情况,可以的话我来个 PR。

I can send a PR if you approve this change.

@afc163
Copy link
Contributor

afc163 commented Mar 2, 2017

use webpack resolve

@yesmeck
Copy link
Contributor

yesmeck commented Mar 2, 2017

antd-mobile 的测试 native 和 web 同时跑的话只能靠这个插件来处理。

@yesmeck
Copy link
Contributor

yesmeck commented Mar 2, 2017

@ @ 我在 https://github.com/ant-design/antd-demo-jest 里处理吧。

@cncolder
Copy link
Contributor Author

cncolder commented Mar 2, 2017

这是我在尝试 antd-mobile 用于 SSR 过程中碰到的问题,当时的想法有点简单了,实际处理起来要更加复杂。光凭这个 PR 不足以解决问题。

要想真正解决 SSR 问题,服务端只能是 hacker require.extensions

@sorrycc
Copy link
Member

sorrycc commented Mar 6, 2017

@yesmeck 抱歉,这几个星期比较忙,刚看到。欢迎 PR。

@paranoidjk
Copy link
Contributor

@yesmeck webpack resolve 应该可以解决这个问题? native 和 web 同时跑可以起两个node,用两份webpack配置么?

@paranoidjk paranoidjk self-assigned this Jul 14, 2017
paranoidjk added a commit that referenced this issue Jul 31, 2017
zhanguangao pushed a commit to zhanguangao/babel-plugin-module-federation-import that referenced this issue Sep 1, 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

Successfully merging a pull request may close this issue.

5 participants