MOBILE-3947 core: Don't include angular/compiler in main bundle

main
Dani Palou 2023-12-04 15:05:52 +01:00
parent 3b1f1fb638
commit dc5d22f503
1 changed files with 2 additions and 2 deletions

View File

@ -160,8 +160,6 @@ import { CorePromisedValue } from '@classes/promised-value';
import { CorePlatform } from '@services/platform'; import { CorePlatform } from '@services/platform';
import { CoreAutoLogoutService } from '@features/autologout/services/autologout'; import { CoreAutoLogoutService } from '@features/autologout/services/autologout';
import '@angular/compiler';
/** /**
* Service to provide functionalities regarding compiling dynamic HTML and Javascript. * Service to provide functionalities regarding compiling dynamic HTML and Javascript.
*/ */
@ -206,6 +204,8 @@ export class CoreCompileProvider {
viewContainerRef: ViewContainerRef, viewContainerRef: ViewContainerRef,
extraImports: any[] = [], // eslint-disable-line @typescript-eslint/no-explicit-any extraImports: any[] = [], // eslint-disable-line @typescript-eslint/no-explicit-any
): Promise<ComponentRef<T> | undefined> { ): Promise<ComponentRef<T> | undefined> {
// Import the Angular compiler to be able to compile components in runtime.
await import('@angular/compiler');
// Create the component using the template and the class. // Create the component using the template and the class.
const component = Component({ template })(componentClass); const component = Component({ template })(componentClass);