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 使用dva脚手架构建项目,引用ant组件后,在IE浏览器中报错 对象不支持startwith #4418

Closed
guojs opened this issue Dec 30, 2016 · 10 comments
Assignees

Comments

@guojs
Copy link

guojs commented Dec 30, 2016

发生问题的环境是:

  • antd 版本:
  • 操作系统及其版本:
  • 浏览器及其版本: ie11

您做了什么?请提供尽可能详细的重现步骤。

您期待的结果是:

实际上的结果是:

image

可重现的在线演示

@afc163
Copy link
Member

afc163 commented Dec 30, 2016

#3400

@afc163 afc163 closed this as completed Dec 30, 2016
@afc163
Copy link
Member

afc163 commented Dec 30, 2016

@sorrycc dva-cli 默认没有 babel-runtime 么?

@sorrycc
Copy link
Contributor

sorrycc commented Dec 30, 2016

有的。

@afc163
Copy link
Member

afc163 commented Dec 30, 2016

runtime 估计没有对 node_modules 里的做处理,还是需要 polyfill.

@sorrycc
Copy link
Contributor

sorrycc commented Dec 30, 2016

babel 现在是不对 node_modules 下的模块做处理的。

@benjycui
Copy link
Contributor

benjycui commented Jan 3, 2017

更合理的应该是 antd 自身 babel-plugin-transform-runtime 处理一下。。

@benjycui benjycui reopened this Jan 3, 2017
@benjycui benjycui self-assigned this Jan 3, 2017
@benjycui
Copy link
Contributor

benjycui commented Jan 3, 2017

这个可以做到下一个 minor 版本,去除 antd 对 polyfill 的依赖。

@afc163
Copy link
Member

afc163 commented Jan 3, 2017

自身很难处理,因为最多只能把 dist 里的文件给处理好,如果用户直接依赖 https://github.com/facebook/fbjs 的源码就不行了。

@lesskao
Copy link

lesskao commented Jan 3, 2017

在CSS Loader 中包含antd 目录就可以正常按需加载了,昨天被这个问题困扰了一天。
相应的IE下的这个问题就消失了,原因我也不知道。
qq 20170103142338

@benjycui benjycui closed this as completed Jan 3, 2017
@lock
Copy link

lock bot commented May 2, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants