MOBILE-2163 compile: Decrease addon components in compile

main
Dani Palou 2018-06-12 19:11:25 +02:00
parent 804e8c7b02
commit 0703237441
2 changed files with 3 additions and 8 deletions

View File

@ -292,8 +292,8 @@ var templatesSrc = [
'./src/components/**/*.html', './src/components/**/*.html',
'./src/core/**/components/**/*.html', './src/core/**/components/**/*.html',
'./src/core/**/component/**/*.html', './src/core/**/component/**/*.html',
'./src/addon/**/components/**/*.html', // Only some addon components are injected to compile to decrease load time. Copy only the ones that are needed.
'./src/addon/**/component/**/*.html' './src/addon/mod/assign/components/**/*.html'
], ],
templatesDest = './www/templates'; templatesDest = './www/templates';

View File

@ -114,10 +114,7 @@ import { ADDON_PUSHNOTIFICATIONS_PROVIDERS } from '@addon/pushnotifications/push
import { ADDON_REMOTETHEMES_PROVIDERS } from '@addon/remotethemes/remotethemes.module'; import { ADDON_REMOTETHEMES_PROVIDERS } from '@addon/remotethemes/remotethemes.module';
// Import some addon modules that define components, directives and pipes. Only import the important ones. // Import some addon modules that define components, directives and pipes. Only import the important ones.
import { AddonMessagesComponentsModule } from '@addon/messages/components/components.module';
import { AddonModAssignComponentsModule } from '@addon/mod/assign/components/components.module'; import { AddonModAssignComponentsModule } from '@addon/mod/assign/components/components.module';
import { AddonModForumComponentsModule } from '@addon/mod/forum/components/components.module';
import { AddonNotificationsComponentsModule } from '@addon/notifications/components/components.module';
/** /**
* Service to provide functionalities regarding compiling dynamic HTML and Javascript. * Service to provide functionalities regarding compiling dynamic HTML and Javascript.
@ -138,9 +135,7 @@ export class CoreCompileProvider {
protected IMPORTS = [ protected IMPORTS = [
IonicModule, TranslateModule.forChild(), CoreComponentsModule, CoreDirectivesModule, CorePipesModule, IonicModule, TranslateModule.forChild(), CoreComponentsModule, CoreDirectivesModule, CorePipesModule,
CoreCourseComponentsModule, CoreCoursesComponentsModule, CoreSiteHomeComponentsModule, CoreUserComponentsModule, CoreCourseComponentsModule, CoreCoursesComponentsModule, CoreSiteHomeComponentsModule, CoreUserComponentsModule,
CoreCourseDirectivesModule, CoreSitePluginsDirectivesModule, CoreQuestionComponentsModule, AddonMessagesComponentsModule, CoreCourseDirectivesModule, CoreSitePluginsDirectivesModule, CoreQuestionComponentsModule, AddonModAssignComponentsModule,
AddonModAssignComponentsModule, AddonModForumComponentsModule,
AddonNotificationsComponentsModule
]; ];
constructor(protected injector: Injector, logger: CoreLoggerProvider, compilerFactory: JitCompilerFactory) { constructor(protected injector: Injector, logger: CoreLoggerProvider, compilerFactory: JitCompilerFactory) {