feat(@schematics/angular): remove useless import for Ivy#11874
feat(@schematics/angular): remove useless import for Ivy#11874vikerman merged 1 commit intoangular:masterfrom
Conversation
| @@ -1,4 +1,4 @@ | |||
| import { BrowserModule } from '@angular/platform-browser'; | |||
| <% if (!experimentalIvy) { %>import { BrowserModule } from '@angular/platform-browser';<% } %> | |||
There was a problem hiding this comment.
I think there is the same problem for AppRoutingModule, as at the moment it looks like this is only being used if it's not experimentalIvy
I think that AppRoutingModule shouldn't be effect by the fact if experimentalIvy is enabled or disabled.
That said, maybe @hansl can confirm about this, as he initial working on implementing the experimentalIvy support
There was a problem hiding this comment.
You're right. I generated it without the routing flag so I didn't see it, but I can add it if @hansl confirms.
There was a problem hiding this comment.
Yes. I don't even know if we support router in Ivy.
There was a problem hiding this comment.
I amended the commit to remove the AppRoutingModule if the experimentalIvy flag is used.
Using cli `6.2.0-beta.2` with the new `experimentalIvy` flag leads to:
ERROR in src/app/app.module.ts(1,1): error TS6133: 'BrowserModule' is declared but its value is never read.
151a0b2 to
aae4e75
Compare
|
We should not promote unused variable to a compiler error. Do we have |
|
@alexeagle no worries, it's not in the default tsconfig. Sorry if my description was misleading: I just wanted to point out that the useless imports should be removed. |
|
Rerunning failed tests... |
|
Please assign appropriate merge target |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Using cli
6.2.0-beta.2with the newexperimentalIvyflag leads to: