Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

webapck打包之后里面会带箭头函数

image.png
用webpack打包之后里面会有箭头函数,导致在ie里面用不了
image.png

webpack配置

image.png

babel配置

image.png

package.json

不知道是什么原因


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
{
  "presets": [
    ["env", {
      "targets": {
        "browsers": [
            "> 1%",
            "last 2 versions",
            "Android >= 3.2", 
            "Firefox >= 20", 
            "iOS 7"
        ]
      },
    }]
  ]
}

你试试


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...