first of all i have to say i'm no angular expert, but i'm facing a problem with A Huge vendor.bundle.js reaching 21MB, which is really bad I'm guessing xD.
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 1.56 MB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 559 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 2.63 MB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 22.8 MB [initial] [rendered]
it goes down to 8MB once using --aot and build-optimizer, but still i think its way too huge,
i've did the webpack analyzer and i got these results
and i think that i have a huge chunks for compiler and core js to when i check for other people's web pack analysis.
and from what i understood from other threads, that it has something to do with the imports, the libraries we add to the project.
but it wasn't clear to me what imports and from what file. is it the the app.module.ts ? is it the only file that decides and make the vendor file bigger ? or are there any other files that contribute to the size of the vendor file ?
so here is a list of all imports from the app.module.ts
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {AppComponent} from './app.component';
import {ComponentsModule} from 'app/components/components.module';
import {PagesModule} from 'app/pages/pages.module';
import {AuthService} from 'app/services/auth/auth.service';
import {AuthGuardService} from 'app/services/auth/auth-guard.service';
import {UserGuardService} from 'app/services/auth/user-guard.service';
import {AlertService} from 'app/alert.service';
import {routes} from './app.routes';
import {HttpModule} from '@angular/http';
import {UsersService} from './services/users.service';
import {CompaniesService} from './services/companies.service';
import {CustomersService} from './services/customers.service';
import {ProductsService} from 'app/services/products.service';
import {MessageService} from 'primeng/components/common/messageservice';
import {ConfirmationService} from 'primeng/components/common/confirmationservice';
import {GrowlModule} from 'primeng/components/growl/growl';
import {ContactPersonService} from 'app/services/contact-person.service';
import {CompanyDeviceService} from 'app/services/company-device.service';
import {CompanyCredintialService} from 'app/services/company-credintial.service';
import {DepartmentsService} from './services/departments.service';
import {ClubsService} from './services/clubs.service';
import { FilteringPipe } from './pipes/filtering.pipe';
any ideas, suggestions, comments and help would be much appreciated thanks allot