Réponse: Je trouvé la source de problème, j'importe customHttpProvider sur ce module, je suppose paquet ng-jhipster
tirer toute la bibliothèque rxjs
import { Injector } from '@angular/core';
import { Http, RequestOptions, XHRBackend } from '@angular/http';
import { JhiInterceptableHttp } from 'ng-jhipster';
import { AuthExpiredInterceptor } from './auth-expired.interceptor';
import { ErrorHandlerInterceptor } from './errorhandler.interceptor';
import { NotificationInterceptor } from './notification.interceptor';
export function interceptableFactory(
backend: XHRBackend,
defaultOptions: RequestOptions,
injector: Injector
//stateStorageService: StateStorageService,
//eventManager: EventManager
) {
return new JhiInterceptableHttp(
backend,
defaultOptions,
[
new AuthExpiredInterceptor(injector
//, stateStorageService
),
// Other interceptors can be added here
new ErrorHandlerInterceptor(
//eventManager
),
new NotificationInterceptor()
]
);
};
export function customHttpProvider() {
return {
provide: Http,
useFactory: interceptableFactory,
deps: [
XHRBackend,
RequestOptions,
Injector,
//StateStorageService,
//EventManager
]
};
};
vous devez utiliser ** secouage des arbres ** https://webpack.js.org/guides/tree-shaking/ – Hosar
Je cours prod construire avec cli angulaire! 'ng build --prod --stats-json && webpack-paquet-analyseur dist/stats.json' –
Vous pouvez essayer d'ajouter un drapeau' --build-optimizer' pour de meilleurs résultats (cela prend un peu plus de temps) . –