refactor(access-intelligence): remove eager AccessIntelligenceModule import from AppModule (#20305)

AccessIntelligenceModule was imported in both AppModule (eager) and
OrganizationsRoutingModule (lazy via loadChildren). The eager import made
all module-scoped providers application-scoped singletons, defeating
lazy loading and preventing module-scoped service destruction when the
user navigates away from /organizations/:id/access-intelligence.

Remove the eager import so Angular honors the existing lazy route and
scopes providers to the feature-module injector. This matches the
pattern already used by OrganizationIntegrationsModule in the same
routing module.

[PM-26417]
ac-performance-logged^2
Alex 3 weeks ago committed by GitHub
parent 153380a34e
commit f73e2befab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -17,7 +17,6 @@ import { OrganizationsModule } from "./admin-console/organizations/organizations
import { bitPolicyEditRegister } from "./admin-console/policies";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";
import { AccessIntelligenceModule } from "./dirt/access-intelligence/access-intelligence.module";
/**
* This is the AppModule for the commercial version of Bitwarden.
@ -38,7 +37,6 @@ import { AccessIntelligenceModule } from "./dirt/access-intelligence/access-inte
AppRoutingModule,
OssRoutingModule,
OrganizationsModule, // Must be after OssRoutingModule for competing routes to resolve properly
AccessIntelligenceModule,
RouterModule,
WildcardRoutingModule, // Needs to be last to catch all non-existing routes
],

Loading…
Cancel
Save