GithubHelp home page GithubHelp logo

报错了,不知道为啥... about react-ie8 HOT 6 CLOSED

xcatliu avatar xcatliu commented on May 20, 2024
报错了,不知道为啥...

from react-ie8.

Comments (6)

gggin avatar gggin commented on May 20, 2024

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

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

from react-ie8.

xcatliu avatar xcatliu commented on May 20, 2024

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

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

from react-ie8.

gggin avatar gggin commented on May 20, 2024

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

image

from react-ie8.

xcatliu avatar xcatliu commented on May 20, 2024

看上去是 default 的问题。

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

可能需要 es3ify-loader

相关 issue:#1

from react-ie8.

gggin avatar gggin commented on May 20, 2024

Thank you!

from react-ie8.

xcatliu avatar xcatliu commented on May 20, 2024

You are welcome!

from react-ie8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.