what is the difference between this guide https://angular.io/guide/aot-compiler that use @angular/compiler-cli and using command ng build --prod (that use options --aot)??
Angular AoT angular compiler cli vs angular-cli
2.7k Views Asked by Nuovo 001 At
1
There are 1 best solutions below
Related Questions in ANGULAR
- Is it possible to use ES5 JavaScript with Angular 2 instead of TypeScript?
- Module '"angular2/angular2"' has no exported member 'For'
- import syntax in typescript creating another js file in visual studio
- Separate ts file for imports
- How to use an AngularJS 2 component multiple times in the same page?
- injectables not working in angular 2.0 latest build 26
- Does angular2 bootstrap have a way to dynamically target elements like it does in angular 1.x
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Angular 2/Typescript: require not found
- ng-switch in Angular2
- Angular 2 import issue: "Zone already exported on window the object!"
- How to make FileReader work with Angular2?
- Writing the most basic Unit test in Angular 2?
- Angular2: Creating child components programmatically
- AngularJS - TypeError: Cannot read property 'canonicalUrl' of undefined
Related Questions in ANGULAR-CLI
- Running a single test file
- Errro running ng serve - module has no exported member
- 404 error when try to access a direct url in different modules with angular-cli server
- Cloning a repo based on Angular CLI
- External JavaScript library in angular-cli project throws error that $root.document is undefined
- Angular cli for existing github project
- [email protected] (2016-12-15) NOT on npm
- Cannot GET with Angular 2 CLI build
- Handle url redirects in angular-cli application deployed to github pages
- Error using jsonwebtoken with angular-cli application
- Specify order of Styles in angular-cli.json
- Angular, Bootstrap 4, angular-cli - where to place dependent scss and import it?
- Module not found: Error: Can't resolve
- Ag-grid and Angular2 using angular-cli
- Angular 2 CLI so much time compiling
Related Questions in AOT
- angular 2 AOT - with Third Party Libraries
- AOT:throws "Cannot find module '../aot/app/app.module.ngfactory'"
- Angular 2 AOT vs JIT payload comparison
- LEFT JOIN in Dynamics AX View
- Setting default value on a field?
- Adding a range on an enum field
- Why should Android AOT compilation be done only at install time
- Clients seem to be running old (buggy) code after XPO project import
- Angular AOT compilation error "cannot determine module for class Component''
- Angular run AOT + Rollup compilation with ng serve?
- Angular-cli - ng serve --aot I get this error "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"
- tried to find bootstrap error using aot angular
- Angular 2 Set APP_BASE_HREF with a value from a Promise / Observable
- Angular 2 lazy load modules using aot and different pipeline
- Angular 4 + material 2 : AOT compilation fails with server rendering
Related Questions in ANGULAR-COMPILER-CLI
- Angular 2 No provider for CompilerFactory
- The "@angular/compiler-cli" package was not properly installed. Error: Cannot find module '@angular/compiler-cli'
- Angular AOT & Rollup [!] Error: Unexpected token
- After Angular 16 upgrade, throws errors for library mydatepicker and angular2-virtual-scroll not compatible with Angular ivy
- How to fix Angular 11 'Option "progress" is deprecated'?
- Angular 6, ngc, AOT, Angular Router, router.ngfactory and SystemJS
- Angular 8 compile Issue
- How to use file replacements in Angular 10
- 'ngcc' not recognized as internal or external command
- How to package a lazy loaded module following the Angular Package Format specification?
- AOT Compilation error in angular library
- AOT - loading error app.module.ngfactory is not found
- Dynamically loading a component in Angular 2 requires Traceur?
- Angular 9: failed to build an angular library in v9.1.0 which dependes on other angular library
- angular/compiler-cli package was not properly installed
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The Angular CLI takes care of more than just compiling your files for AOT.
Along with the AOT compilation, using
ng build -prodwill also minify, uglify, (partially) eliminate dead code, and bundle your application appropriately (including lazy loaded bundles).Side note:
You can also use the
--build-optimizerflag to further optimize your code. It will remove the vendor bundle, but your overall bundle size should be smaller. This flag is experimental right now and will eventually (hopefully) be moved into the-prodflag. One of the noticeable reasons it's not is that it makes compilation longer.