{"id":19306554,"url":"https://github.com/sonicoder86/angular2-aot-webpack","last_synced_at":"2025-04-09T16:19:02.644Z","repository":{"id":57179478,"uuid":"66561810","full_name":"sonicoder86/angular2-aot-webpack","owner":"sonicoder86","description":"Angular AOT (Ahead Of Time) offline compilation example with Webpack","archived":false,"fork":false,"pushed_at":"2017-10-07T11:01:45.000Z","size":1941,"stargazers_count":311,"open_issues_count":3,"forks_count":51,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-09T16:18:56.704Z","etag":null,"topics":["angular","aot","webpack"],"latest_commit_sha":null,"homepage":"https://blacksonic.github.io/angular2-aot-webpack/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonicoder86.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-25T13:49:28.000Z","updated_at":"2025-03-04T07:56:30.000Z","dependencies_parsed_at":"2022-08-25T21:10:56.329Z","dependency_job_id":null,"html_url":"https://github.com/sonicoder86/angular2-aot-webpack","commit_stats":null,"previous_names":["blacksonic/angular2-aot-webpack","sonicoder86/angular2-aot-webpack","vuesomedev/angular2-aot-webpack"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonicoder86","download_url":"https://codeload.github.com/sonicoder86/angular2-aot-webpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065282,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","aot","webpack"],"created_at":"2024-11-10T00:06:55.563Z","updated_at":"2025-04-09T16:19:02.629Z","avatar_url":"https://github.com/sonicoder86.png","language":"JavaScript","readme":"# Angular AOT (Ahead Of Time) offline compilation example with Webpack\n[![Dependency Status](https://david-dm.org/blacksonic/angular2-aot-webpack.svg)](https://david-dm.org/blacksonic/angular2-aot-webpack)\n[![devDependency Status](https://david-dm.org/blacksonic/angular2-aot-webpack/dev-status.svg)](https://david-dm.org/blacksonic/angular2-aot-webpack?type=dev)\n\nThis repository shows how to use the Angular command line offline compiler ```ngc``` with Webpack.\n\n\u003e If you prefer the Webpack plugin provided by the Angular CLI, \nit can be found in a [separate repository](https://github.com/blacksonic/angular2-aot-cli-webpack-plugin).\n\nThe application consists of \na module (```src/app/modules/main.module.ts```)\nand a basic component (```src/app/components/hello-world.component.ts```) \nwith template (```src/app/components/hello-world.template.html```) \nand component specific style (```src/app/components/hello-world.style.css```).\n\nWhen the application starts (```npm start```) \nit generates the compiled files next to the modules and the components(```*.ngfactory.ts```).\n\nThere is a different entry point for the JIT compiled(```src/app/bootstrap.ts```)\nand AOT compiled application(```src/app/bootstrap.aot.ts```).\n\nThe application is bundled with Webpack from the bootstrap files and is available on ```http://localhost:9000```.\n\n### Advantages\n\n- Can always be used with the newest version of Angular\n- Can output separate compiled files for AOT compatible package publishing\n\n### Disadvantages\n\n- Works only with HTML and CSS, other file types need a previous build step\n- [No watch mode yet](https://github.com/angular/angular/issues/12867), must be done manually (```bin/ngc-watch.js```) and compiles all the files\n- Need to maintain AOT version of bootstrap file\n- Needs cleanup step before compiling\n\n### Known issues\n\n- [AOT related issues](https://github.com/angular/angular/issues?utf8=%E2%9C%93\u0026q=is%3Aissue%20is%3Aopen%20aot)\n\n### Further reading\n\n- [Ahead-of-Time Compilation - official](https://angular.io/docs/ts/latest/cookbook/aot-compiler.html)\n- [Multiple solutions for Angular Ahead of Time (AOT) Compilation](https://blog.craftlab.hu/multiple-solutions-for-angular-ahead-of-time-aot-compilation-c474d9a0d508)\n- [Ahead-of-Time Compilation in Angular 2](http://blog.mgechev.com/2016/08/14/ahead-of-time-compilation-angular-offline-precompilation/)\n- [Building an Angular 2 Application for Production](http://blog.mgechev.com/2016/06/26/tree-shaking-angular2-production-build-rollup-javascript/)\n- [Demystifying Ahead-Of-Time Compilation In Angular 2](http://slides.com/wassimchegham/demystifying-ahead-of-time-compilation-in-angular-2-aot-jit)\n\n### Starters with AOT compilation available\n\n- [Angular CLI](https://github.com/angular/angular-cli)\n- [Angular Seed](https://github.com/mgechev/angular-seed)\n- [Angular Universal Starter](https://github.com/angular/universal-starter)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicoder86%2Fangular2-aot-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonicoder86%2Fangular2-aot-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicoder86%2Fangular2-aot-webpack/lists"}