Builds, dev server, compiler and AOT
Learn Builds, dev server, compiler and AOT (Module 25 · Angular CLI and Developer Tools, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Serve, build and what the compiler does • Development server : ng serve compiles in memory, serves on port 4200 and reloads the browser on save. Change the port with --port , expose to the network with --host 0.0.0.0 , proxy the API with --proxy-config . • Build commands : ng build writes to dist/ ; --configuration development or production ; --watch rebuilds on change; --stats-json creates data for bundle analysis. • Production builds optimize and hash files. • The Angular compiler translates your templates and decorators into efficient JavaScript instructions. AOT (ahead-of-time) does this...