Closed drwatson1 closed 7 years ago
I tried the steps and I received another similar error message:
static/js/main.f4808811.js from UglifyJs
Unexpected token: name (construct) [./~/typescript-ioc/es6.js:26,0][static/js/main.f4808811.js:23017,4]
I could not identify what is exactly the problem, but it looks related to some UglifyJS task when analysing ES6 syntax.
I forced the usage of ES5 versions and the error disappeared to me.
import { Container } from 'typescript-ioc/es5';
Container.bind(Date).to(Date);
It works, once the generated project uses "target": "es5",
on tsconfig.json.
Steps to reproduce are the same as I described some time ago in issue #6 from step 1 to 3. After that run this in command line:
npm run build
and you'll get an error: