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
Description
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:
npm ls react-scripts
(if you haven’t ejected): react-scripts-ts@1.0.6node -v
: v7.4.0npm -v
: 4.1.2
Then, specify:
- Operating system: macOS 10.12.3
- 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
Labels
No labels