Programmierer aus Leidenschaft. Ich lege besonders Wert auf Clean Code und liebe es mich durch legacy Code zu wühlen... und den dann zu refaktorieren 😉.
Never ever reference Angular code from AngularJS and vice versa. Otherwise the bundling process will not work properly and ends with big fat bundles which bootstraps slow.
Use lazy loading in Angular
Don't use a vendor bundle since Angular knows how to split the bundles efficiently
Big bundles / slow bootstrapping? Use webpack bundle analyzer to analyze the bundle
Shared types? Use a *.d.ts file
@psamim
:
You should remove import { angularJsModule } from "../ajs/app";
and use this instead (directly in ngDoBootstrap):
import('../ajs/app').then((angularJsModule)=>{// do the bootstrapping stuff here});
This enables lazy loading and splits the AngularJS in a separate bundle.
Tips for migrating AngularJS to Angular 9:
@psamim :
You should remove
import { angularJsModule } from "../ajs/app";
and use this instead (directly in ngDoBootstrap):
This enables lazy loading and splits the AngularJS in a separate bundle.
Thanks! I'll apply your tips here and report the results.