Skip to content

Files outside src/ aren't compiled with Babel #1699

Closed
@debugpoint136

Description

@debugpoint136

Problem: Using ES6 feature like template string or fat arrow function notation, in any helper JS functions to fetch data and pass it to React components, npm start works fine but npm run build fails

Error:-

static/js/main.edbb179d.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [./api/consensus_view-api.js:65,0]

static/js/main.d10c594a.js from UglifyJs
SyntaxError: Unexpected character '`' [./api/consensus_view-api.js:25,0]

node - 6.10.0
npm - 3.10.10
OS - MacOS El Capitan
react-scripts: 0.9.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions