magarcia / generator-angular2-webpack-starter

Yeoman generator for Angular2 Webpack Starter based on https://angularclass.github.io/angular2-webpack-starter/
MIT License
26 stars 4 forks source link

Angular 2 in IE11 development build works fine, but production build throws an exception #3

Closed jared83 closed 8 years ago

jared83 commented 8 years ago

Hi there, I have created and described my issue in angular2 repo here (issue 6604), but then I thought it could be a problem with the build process rather than with the angular2 itself. So here I go: I am using generator-angular2-webpack-starter To get me up with angular 2. Initially I was suffering from the #6450 issue (and #6516, and #6556), but fixed it with this shim. This made ie11 (ver. 11.0.9600.18161 under win8.1 64bit) run angular 2 without a hitch when served with 'npm run server' i.e. the default server for development. However, when I run the production server ( 'npm run server:prod' ) I am getting this error from ie:

SyntaxError: Expected ')'
   {
      [functions]: ,
      __proto__: { },
      description: "Expected ')'",
      message: "Expected ')'",
      name: "SyntaxError",
      number: -2146827282,
      stack: "SyntaxError: Expected ')'
   at evalExpression (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:1:5145)
   at TemplateCompiler.prototype._createViewFactoryRuntime (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:12:18596)
   at Anonymous function (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:12:16304)
   at Zone.prototype.run (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:39:28533)
   at Anonymous function (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:9:15715)
   at Anonymous function (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:39:28195)
   at lib$es6$promise$$internal$$tryCatch (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:15:19609)
   at lib$es6$promise$$internal$$invokeCallback (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:15:19933)
   at Anonymous function (http://localhost:8080/vendor.8fc5d82b021700e458db.bundle.js:15:29419)
   at Anonymous function (http://localhost:8080/vendor.8fc5d82b0217"
   }

and but a "Loading..." message on the screen. Any help highly appreciated. I've got to get this running in ie asap. Thank you for your time in advance. Jared

magarcia commented 8 years ago

This project is a generator based in angular-webpack-starter, so problably you should report the issue there.

So I will try to replicate the issue. Can you give more info about your project? It's the code generated and executed or you change/add something?

jared83 commented 8 years ago

I changed nothing in the configuration files. None of them. The only things I did are

that is all I did.

jared83 commented 8 years ago

It turns out the issue was/is on Angular 2 beta1 side. To fix it I disabled the UglifyJsPlugin in the webpack.prod.config.js file. This issue can now be closed.

magarcia commented 8 years ago

Ok, thanks