{"id":19306623,"url":"https://github.com/sonicoder86/angular2-aot-cli-webpack-plugin","last_synced_at":"2025-07-04T19:08:51.633Z","repository":{"id":113389726,"uuid":"77393977","full_name":"sonicoder86/angular2-aot-cli-webpack-plugin","owner":"sonicoder86","description":"Angular AOT (Ahead Of Time) compilation with Webpack plugin","archived":false,"fork":false,"pushed_at":"2017-10-08T10:17:37.000Z","size":173,"stargazers_count":40,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T12:36:43.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-12-26T16:05:04.000Z","updated_at":"2021-12-21T12:04:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"eaee3932-a731-4615-9c3f-3c4321ab315d","html_url":"https://github.com/sonicoder86/angular2-aot-cli-webpack-plugin","commit_stats":null,"previous_names":["sonicoder86/angular2-aot-cli-webpack-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sonicoder86/angular2-aot-cli-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-cli-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-cli-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-cli-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-cli-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonicoder86","download_url":"https://codeload.github.com/sonicoder86/angular2-aot-cli-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicoder86%2Fangular2-aot-cli-webpack-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263604015,"owners_count":23487223,"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":[],"created_at":"2024-11-10T00:07:10.018Z","updated_at":"2025-07-04T19:08:51.618Z","avatar_url":"https://github.com/sonicoder86.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular AOT (Ahead Of Time) compilation with the Angular CLI Webpack plugin\n[![Dependency Status](https://david-dm.org/blacksonic/angular2-aot-cli-webpack-plugin.svg)](https://david-dm.org/blacksonic/angular2-aot-cli-webpack-plugin)\n[![devDependency Status](https://david-dm.org/blacksonic/angular2-aot-cli-webpack-plugin/dev-status.svg)](https://david-dm.org/blacksonic/angular2-aot-cli-webpack-plugin?type=dev)\n\nThis repository shows how to use the Angular CLI Webpack plugin (`@ngtools/webpack`) to achieve AOT offline compilation.\n\nIt can also work with the new `@utlimate/aot-loader` package and has very similar configuration.\nSee example in [separate branch](https://github.com/blacksonic/angular2-aot-cli-webpack-plugin/tree/ultimate).\n\n\u003e If you prefer the command line tool (```ngc```) provided by Angular, \nit can be found in a [separate repository](https://github.com/blacksonic/angular2-aot-webpack).\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.pug```) \nand component specific style (```src/app/components/hello-world.style.sass```).\n\nWhen the application starts (```npm start```) \nit generates the compiled files in memory \nand replaces the bootstrap logic to use the generated ```NgFactory``` files.\n\nThe application is bundled with Webpack from the main file and is available on ```http://localhost:9000```.\n\n### Advantages\n\n- Custom file types available for templates and styles through Webpack loaders (sass, pug,...)\n- No separate process for compilation\n- Watch mode for AOT compiled files\n- No need to maintain AOT version of bootstrap file\n- No output to disk for separate ```*.ngfactory.ts``` files during compilation\n\n### Disadvantages\n\n- Need to wait for new versions after Angular release to Angular CLI repository catch up\n- Not good for AOT compatible package publishing, because it doesn't output separate compiled files\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- [AOT Webpack plugin related issues](https://github.com/angular/angular-cli/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicoder86%2Fangular2-aot-cli-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonicoder86%2Fangular2-aot-cli-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicoder86%2Fangular2-aot-cli-webpack-plugin/lists"}