Skip to content

SCRIPT1010: Expected identifier - Production build not running on IE11 #4255

@VishalGulati

Description

@VishalGulati

I created a new project with create-react-app today. The production build is not running fine on IE11, the console shows following error:

SCRIPT1010: Expected identifier

The line it points to inside my main.js:

{var n=e&&e.__esModule?function(){return e.default}:function(){return e};

The error is after the e.(default) above. My package json is plain:

{
  "name": "sample-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.3.1",
    "react-dom": "^16.3.1",
    "react-scripts": "1.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

Strange enough, my dev server works perfectly on IE11 so issue is only with production build. It works well on Chrome as well. Is that I need to have polyfills?

cc @gaearon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions