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

报错了,不知道为啥... #21

Closed
gggin opened this issue Mar 22, 2016 · 6 comments
Closed

报错了,不知道为啥... #21

gggin opened this issue Mar 22, 2016 · 6 comments

Comments

@gggin
Copy link

gggin commented Mar 22, 2016

image

@gggin
Copy link
Author

gggin commented Mar 22, 2016

使用了还有es5-shime的标准用法

new webpack.optimize.UglifyJsPlugin({
compressor: {
screw_ie8: true
}
})

@xcatliu
Copy link
Owner

xcatliu commented Mar 22, 2016

可以看到报错内容吗?
代码不压缩的时候不会报错吗?

另外可以加上 sourceMap,这样可以看到压缩前的代码(不过好像 IE8 还不支持),详见:https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin

@gggin
Copy link
Author

gggin commented Mar 22, 2016

太贴心了 不压缩也会报错
image

image

@xcatliu
Copy link
Owner

xcatliu commented Mar 22, 2016

看上去是 default 的问题。

default 是 es3 的关键字,不能直接作为 object 的 key,否则会在 IE8 里面报错。

可能需要 es3ify-loader

相关 issue:#1

@gggin
Copy link
Author

gggin commented Mar 22, 2016

Thank you!

@gggin gggin closed this as completed Mar 22, 2016
@xcatliu
Copy link
Owner

xcatliu commented Mar 22, 2016

You are welcome!

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

No branches or pull requests

2 participants