-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion to use Closure Compiler for Ahead of Time Compilation #2981
Comments
+1 recorded above. Some related discussion from the Angular repo angular/angular#8550 |
@filipesilva is there a short or long term plan to support closure's advanced optimization? |
We've been looking at ways we can add it but so far there isn't any viable solution. |
If you are interested in following the progress, better subscribe to the Closure support issue in Angular itself (angular/angular#8550). |
4.0 just announced experimental support for closure compiler for the framework itself I suppose... |
Yes, here are the details, http://angularjs.blogspot.com/2017/03/angular-400-now-available.html . But it says that "All of our code now has Closure annotations" are they referring to the angular code or the code aot compiler generates. Does it mean that our custom components, directives etc should also have closure Annotations? and same goes for the angular plugins as well? |
The only reason I refuse to use the CLI for Enterprise projects is because it does not support ClosureCompiler. During ng-conf it was announced that internal teams at Google validate the latest versions of Angular and these teams are using ClosureCompiler. I would feel way more comfortable using a similar build process that replicates how teams at Google bundle Angular web apps. Webpack may be the popular option, but there could be smaller bundles produced through other methods and more optimal code splitting. The core team is already experimenting with going straight from AOT => ClosureCompiler (https://github.com/alexeagle/closure-compiler-angular-bundling). It would be nice if the CLI would support this and Code Splitting. |
hope we can see this one day in cli, actually bundle i know there is gzip but even |
It seems like it is working not with rxjs https://github.com/angular/closure-demo |
There is limited support for ngc => ClosureCompiler and third party libraries ATM but that will change over time. Use "externs" to support third party libraries. |
Hi everyone, any updates on this? angular/angular#8550 was closed early this year. I see all the demo repos but they use Cheers! |
+1 on the request for updates. After all the work that went into Closure support and fanfare around it during the 4.0 release, I was surprised to see The Past, Present, and Future of the Angular CLI not even acknowledge this. Edit: angular/angular#19058 |
We're reworking the entire build chain, so closing this. |
@hansl could you give us some related issues to the refactoring the team is working on? I've been following this for a while and would like to see where it goes. :) |
Any update on this? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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:
angular/angular#12184
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.
The text was updated successfully, but these errors were encountered: