{"id":13566898,"url":"https://github.com/fathyb/parcel-plugin-angular","last_synced_at":"2025-03-22T05:30:50.281Z","repository":{"id":57318982,"uuid":"115702986","full_name":"fathyb/parcel-plugin-angular","owner":"fathyb","description":"Complete Angular support for Parcel","archived":false,"fork":false,"pushed_at":"2018-01-14T18:39:43.000Z","size":627,"stargazers_count":30,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-03-14T15:51:49.481Z","etag":null,"topics":["angular","aot","jit","parcel"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fathyb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-29T08:19:56.000Z","updated_at":"2025-02-06T16:03:06.000Z","dependencies_parsed_at":"2022-08-25T19:50:50.243Z","dependency_job_id":null,"html_url":"https://github.com/fathyb/parcel-plugin-angular","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fathyb%2Fparcel-plugin-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fathyb%2Fparcel-plugin-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fathyb%2Fparcel-plugin-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fathyb%2Fparcel-plugin-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fathyb","download_url":"https://codeload.github.com/fathyb/parcel-plugin-angular/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244912800,"owners_count":20530764,"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","jit","parcel"],"created_at":"2024-08-01T13:02:19.078Z","updated_at":"2025-03-22T05:30:48.453Z","avatar_url":"https://github.com/fathyb.png","language":"TypeScript","readme":"# parcel-plugin-angular\n\nComplete Angular support for Parcel and TypeScript.\n\n![screenshot](.assets/screenshot.png)\n\n## Features\n\n- [`parcel-plugin-typescript` features](https://github.com/fathyb/parcel-plugin-typescript#features)\n- AOT compilation : using the official Angular compiler for smaller and faster applications.\n- Lazy Loading : the plugin automagically splits your Angular modules in multiple JavaScript files with Parcel when you use lazy routes.\n- Template and style parsing : your templates and style are processed by Parcel to find and replace resources.\n- Transformations (based on [`angular/angular-cli`](https://github.com/angular/angular-cli) transformers) :\n\t- It removes all your Angular decorators in AOT mode for smaller bundles\n\t- It replaces JIT bootstrap code with AOT when it's used. You can keep one main file using the `@angular/platform-browser-dynamic` module, see [Entry file](#entry-file)\n\n## Prerequisites\n\n- `@angular/compiler` and `@angular/compiler-cli` should be installed\n- `parcel-plugin-typescript` should not be installed\n\n## Installation\n\n`yarn add parcel-plugin-angular --dev`\n\nor\n\n`npm install parcel-plugin-angular --save-dev`\n\n## Configuration\n\nYou can pass a `parcelAngularOptions` object in your `tsconfig.json`, here are the defaults :\n```js\n{\n  \"compilerOptions\": { ... },\n  // the plugin options\n  \"parcelAngularOptions\": {\n    // What compiler should we use when watching or serving\n    \"watch\": \"jit\",\n\n    // What compiler should we use when building (parcel build)\n    \"build\": \"aot\"\n  }\n}\n```\n\n## Entry file\n\nTo make it easy to switch between JIT and AOT mode we automatically translate your JIT bootstrap code to AOT if you are using the AOT compiler.\n\n```ts\nimport {platformBrowserDynamic} from '@angular/platform-browser-dynamic'\nimport {enableProdMode} from '@angular/core'\nimport {AppModule} from './app/app.module'\n\nif(process.env.NODE_ENV === 'production') {\n  enableProdMode()\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n```\n\nwill be transformed to :\n\n```ts\nimport {platformBrowser} from '@angular/platform-browser'\nimport {enableProdMode} from '@angular/core'\nimport {AppModuleNgFactory} from './app/app.module.ngfactory'\n\nif(process.env.NODE_ENV === 'production') {\n  enableProdMode()\n}\n\nplatformBrowser().bootstrapModuleFactory(AppModuleNgFactory)\n```\n\n## Known issues\n\n- AOT mode is highly experimental\n- Lazy-loading does not work in JIT\n","funding_links":[],"categories":["Plugins","TypeScript"],"sub_categories":["Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffathyb%2Fparcel-plugin-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffathyb%2Fparcel-plugin-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffathyb%2Fparcel-plugin-angular/lists"}