Title: [4.0.0] bug(compiler-cli): Cannot use JitCompiler with AoT · Issue #15510 · angular/angular · GitHub
Open Graph Title: [4.0.0] bug(compiler-cli): Cannot use JitCompiler with AoT · Issue #15510 · angular/angular
X Title: [4.0.0] bug(compiler-cli): Cannot use JitCompiler with AoT · Issue #15510 · angular/angular
Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
Open Graph Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
X Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
Opengraph URL: https://github.com/angular/angular
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[4.0.0] bug(compiler-cli): Cannot use JitCompiler with AoT","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING\r\n-->\r\n\r\n**I'm submitting a ...** (check one with \"x\")\r\n```\r\n[x] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\nSince 4.0.0, `JitCompiler` cannot be used with AoT compilation. It's exported from `@angular/compiler` but its compiled import path is `@angular/compiler/src/jit/compiler`\r\n\r\napp.module.ts\r\n\r\n```ts\r\nimport { NgModule, Compiler } from '@angular/core';\r\nimport { JitCompiler } from '@angular/compiler';\r\n\r\nimport { AppComponent } from './app.component';\r\n\r\n@NgModule({\r\n declarations: [AppComponent],\r\n bootstrap: [AppComponent],\r\n providers: [\r\n {\r\n provide: Compiler, useExisting: JitCompiler,\r\n },\r\n ]\r\n})\r\nexport class AppModule {\r\n}\r\n```\r\n\r\napp.module.ngfactory.ts(summary)\r\n\r\n```ts\r\nimport * as import0 from '@angular/core';\r\nimport * as import1 from './app.module';\r\nimport * as import2 from './app.component.ngfactory';\r\nimport * as import3 from '@angular/compiler/src/jit/compiler';\r\nclass AppModuleInjector extends import0.ɵNgModuleInjector\u003cimport1.AppModule> {\r\n _AppModule_0:import1.AppModule;\r\n __Compiler_1:any;\r\n constructor(parent:import0.Injector) {\r\n super(parent,[import2.AppComponentNgFactory],[import2.AppComponentNgFactory]);\r\n }\r\n get _Compiler_1():any {\r\n if ((this.__Compiler_1 == null)) { (this.__Compiler_1 = this.parent.get(import3.JitCompiler)); }\r\n return this.__Compiler_1;\r\n }\r\n```\r\n\r\n`@angular/compiler/src/jit/compiler` is not existing JS file (because of 4.0.0 FESM). webpack bundling crashes by this problem.\r\n\r\n\r\n**Expected behavior**\r\n\r\nResolve `JitCompiler` from `@angular/compiler`\r\n\r\n**Minimal reproduction of the problem with instructions**\r\n\r\nhttps://github.com/laco0416/ngrepro-0001\r\n\r\n1. git clone\r\n2. npm install\r\n3. npm run ngc\r\n4. see the generated files\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\n\u003c!-- Describe the motivation or the concrete use case -->\r\n\r\n**Please tell us about your environment:**\r\nOSX\r\n\r\n* **Angular version:** 4.0.0\r\n\u003c!-- Check whether this is still an issue in the most recent Angular version -->\r\n \r\n* **Language:** TypeScript 2.2\r\n\r\n* **Node (for AoT issues):** `node --version` = 6.9.5\r\n","author":{"url":"https://github.com/lacolaco","@type":"Person","name":"lacolaco"},"datePublished":"2017-03-27T01:44:38Z","url":"https://github.com/angular/angular/issues/15510"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:32f4f8d9-6de0-3f61-164a-2d8f076ecefa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E100:213839:EDDB31:132E71E:6B00FCE9 |
| html-safe-nonce | c40ec4bf9c2e4261558ea3d4b0e1f977bad49bac09854abb707b41acacc19970 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTAwOjIxMzgzOTpFRERCMzE6MTMyRTcxRTo2QjAwRkNFOSIsInZpc2l0b3JfaWQiOiI3NzMyODIwNzk2OTY3NTUwMTg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ad3cdfa3b803da2d4e65fa4e03df18300581c68cd07b9f50ec924a03a97fb7b1 |
| hovercard-subject-tag | repository:24195339 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/angular/angular/issues/15510 |
| twitter:image | https://repository-images.githubusercontent.com/24195339/d4194dc2-d880-43f7-960c-ea30e05c6531 |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/24195339/d4194dc2-d880-43f7-960c-ea30e05c6531 |
| og:image:alt | Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub. |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-cache |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width