-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Suggestion to use Closure Compiler for Ahead of Time Compilation after generating ngfactory files.
OS?
Windows 10
Versions
angular-cli: 1.0.0-beta.19
node: 6.9.1
I am sure Angular CLI team is working hard on the features like AoT with support for Lazy Loading.
While you finalize this feature, I wanted to suggest you to use Closure Compiler after generating ngfactory files using ngc, because it seems to be the only tool that would transpile the ES2015 Rollup Bundle to ES5 with 100% reliability.
While compiling large projects with ngc (after generating ngfactory), it returns Heep Errors. Please have a look at:
I came across this repository, https://github.com/steveblue/angular2-rollup and in Production notes it explains why Closure Compile is a better option. Please have a look at:
https://github.com/steveblue/angular2-rollup#production
When using Angular CLI in my current project:
If I use lazy loading and build with --prod --aot, it just generate main bundle and when I run it returns missing module error.
If I remove lazyloading and build with --prod --aot, its returns same heep error which I mentioned above.