React, WebPack and Babel for Internet Explorer 10 and below produces SCRIPT1002: Syntax error

前端 未结 2 1522
花落未央
花落未央 2021-01-19 05:31

I\'ve read multiple threads regarding similar issues and tried some propositions, but had no results.

I\'ve followed few tutorials related to React.js

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-19 06:06

    In your package.json file

    change the version of webpack-dev-server to version "2.7.1" (or earlier).

    "webpack-dev-server": "2.7.1"
    

    Then do a npm install et voilà.

    That solved the problem for me.

    All versions after 2.7.1 gives me an error similar to yours.

提交回复
热议问题