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

IE8下antd组件无法加载, default 在IE8下是关键字? #858

Closed
codering opened this Issue Jan 13, 2016 · 15 comments

Comments

Projects
None yet
4 participants
@codering

codering commented Jan 13, 2016

以前没遇到过,突然就出现了。 不知道是不是 default 没用引号包裹引起的, 我看rc的js是'default'
image

@codering codering changed the title from IE8下组件无法加载, default 在IE8下是关键字? to IE8下antd组件无法加载, default 在IE8下是关键字? Jan 13, 2016

@afc163

This comment has been minimized.

Show comment
Hide comment
@afc163
Member

afc163 commented Jan 13, 2016

@afc163 afc163 closed this Jan 13, 2016

@sorrycc

This comment has been minimized.

Show comment
Hide comment
@sorrycc

sorrycc Jan 13, 2016

Member

之前的配置没处理 node_modules,试下这个配置:
https://github.com/ant-design/antd-init/blob/master/boilerplate/webpack.config.js#L10-L14

Member

sorrycc commented Jan 13, 2016

之前的配置没处理 node_modules,试下这个配置:
https://github.com/ant-design/antd-init/blob/master/boilerplate/webpack.config.js#L10-L14

@codering

This comment has been minimized.

Show comment
Hide comment
@codering

codering Jan 13, 2016

@sorrycc 不用webpack, 怎么处理? RC组件单独可用,为什么antd不可以

codering commented Jan 13, 2016

@sorrycc 不用webpack, 怎么处理? RC组件单独可用,为什么antd不可以

@benjycui

This comment has been minimized.

Show comment
Hide comment
@benjycui

benjycui Jan 13, 2016

Contributor

你指的单独用是只引进某个组件么?

import Button from 'antd/lib/button';
Contributor

benjycui commented Jan 13, 2016

你指的单独用是只引进某个组件么?

import Button from 'antd/lib/button';
@codering

This comment has been minimized.

Show comment
Hide comment
@codering

codering commented Jan 13, 2016

@benjycui 恩。

@codering

This comment has been minimized.

Show comment
Hide comment
@codering

codering Jan 13, 2016

@benjycui 我疑惑的是 rc组件没依赖es3ify也可用,antd就不可用,编译工具不一样?

codering commented Jan 13, 2016

@benjycui 我疑惑的是 rc组件没依赖es3ify也可用,antd就不可用,编译工具不一样?

@benjycui

This comment has been minimized.

Show comment
Hide comment
@benjycui

benjycui Jan 13, 2016

Contributor
  1. 只要你是用 antd-init 生成的模板进行开发,在打包时会自动按需打包。
  2. npm i antd 得到的代码就已经是编译过的了。
Contributor

benjycui commented Jan 13, 2016

  1. 只要你是用 antd-init 生成的模板进行开发,在打包时会自动按需打包。
  2. npm i antd 得到的代码就已经是编译过的了。
@sorrycc

This comment has been minimized.

Show comment
Hide comment
@sorrycc

sorrycc Jan 13, 2016

Member

@codering rc-component 编译是用的 babel5,所以没问题。
@afc163 @benjycui antd 编译代码的时候加入 es3ify ?

Member

sorrycc commented Jan 13, 2016

@codering rc-component 编译是用的 babel5,所以没问题。
@afc163 @benjycui antd 编译代码的时候加入 es3ify ?

@sorrycc sorrycc reopened this Jan 13, 2016

@afc163

This comment has been minimized.

Show comment
Hide comment
@afc163

afc163 Jan 13, 2016

Member

可以有,@sorrycc 来个 PR 。

Member

afc163 commented Jan 13, 2016

可以有,@sorrycc 来个 PR 。

@sorrycc

This comment has been minimized.

Show comment
Hide comment
@sorrycc

sorrycc Jan 13, 2016

Member

dist 文件可以转,但 src 下的文件转起来挺麻烦的,还是不要搞了。redux 作者采用的方法是切换成 commonjs 的 module 写法。

https://phabricator.babeljs.io/T2817#70267

Member

sorrycc commented Jan 13, 2016

dist 文件可以转,但 src 下的文件转起来挺麻烦的,还是不要搞了。redux 作者采用的方法是切换成 commonjs 的 module 写法。

https://phabricator.babeljs.io/T2817#70267

@codering

This comment has been minimized.

Show comment
Hide comment
@codering

codering Jan 13, 2016

我用的fis3, 自己写个基于es3ify的parser插件解决了。

codering commented Jan 13, 2016

我用的fis3, 自己写个基于es3ify的parser插件解决了。

@afc163

This comment has been minimized.

Show comment
Hide comment
@afc163

afc163 Jan 29, 2016

Member

目前 https://github.com/ant-design/antd-init 脚手架的默认模板已经解决了 IE8 的问题。

Member

afc163 commented Jan 29, 2016

目前 https://github.com/ant-design/antd-init 脚手架的默认模板已经解决了 IE8 的问题。

@sorrycc

This comment has been minimized.

Show comment
Hide comment
Member

sorrycc commented Feb 2, 2016

@afc163

This comment has been minimized.

Show comment
Hide comment
@afc163

afc163 Mar 8, 2016

Member

babel@6.6 解决了这个问题。babel/babel#3368

Member

afc163 commented Mar 8, 2016

babel@6.6 解决了这个问题。babel/babel#3368

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 6, 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 bot commented May 6, 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 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.