Hello all,

I've been using the cookbooks on the angular website for Webpack and AOT:

http://angular.io/docs/ts/latest/cookbook/aot-compiler.html
http://angular.io/docs/ts/latest/guide/webpack.html

However, when I combine these 2 together, it seems that the AOT compilation 
is failing.

I've created an SO post about this, but no luck, so I was hoping you guys 
would have a much better understanding on how to set-up AOT compilation in 
angular2.
http://stackoverflow.com/questions/40003205/webpack-angular2-aot-uncaught-syntaxerror-unexpected-token-import

Here is where I currently ended up:
https://github.com/jetlogs/Angular2-AOT-Localization

If I do a basic integration using just the aot and webpack documentation 
from the angular website, I end up with:

ng_module_factory.js?95b1:13 Uncaught SyntaxError: Unexpected token import

since the ngfactory files compiled by the aot compiler references the es6 
js src files directly

The next step I did was to transpile the angular2 library using Babel by 
adding this line on my webpack loaders config:

{
    test: /\.js$/,
    loader: 'babel',
    include: [
        /node_modules(\\|\/)@angular/
    ],
    exclude: [
        /\.umd\.js$/
    ],
    query: {
        presets: ['es2015']
    }
},


the new bundle now doesn't have the ES6 import errors, but it seems that at 
runtime, it throws a new error:

core.umd.js?e2a5:3272Uncaught Error: No provider for NgZone!

would anyone be able to guide me on how to do the webpack + AOT set-up 
correctly?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to