Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Changing target to ES6 causes build script to fail #21

Closed
@magicmaaaaan

Description

@magicmaaaaan

Can you reproduce the problem with latest npm?

Yes

Description

After changing the tsc target to es6, react-scripts-ts build fails during minification (I think). Running the development server (react-scripts-ts start) works fine on the es6 target.

Expected behavior

The build script should not fail.

Actual behavior

$ npm run build

> fooapp@0.1.0 build /private/tmp/fooapp
> react-scripts-ts build

Creating an optimized production build...
ts-loader: Using typescript@2.1.5 and /private/tmp/fooapp/tsconfig.json
Failed to compile.

static/js/main.33e14f74.js from UglifyJs
SyntaxError: Unexpected token: name (App) [./~/tslint-loader!./src/App.tsx:6,0]

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): react-scripts-ts@1.0.6
  2. node -v: v7.4.0
  3. npm -v: 4.1.2

Then, specify:

  1. Operating system: macOS 10.12.3
  2. Browser and version: N/A

Reproducible Demo

$ cd /tmp
$ create-react-app fooapp --scripts-version=react-scripts-ts
$ cd fooapp
$ sed -i '' 's/es5/es6/' tsconfig.json
$ npm run build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions