OasisDigital / angular-enterprise-example

Scalable / Large Angular application structure example
MIT License
125 stars 47 forks source link

AOT with lazy-loaded routes with cross-package feature routes #14

Closed kylecordes closed 6 years ago

kylecordes commented 7 years ago

Currently the build with AOT is turned off on Travis, because of this CLI issue:

https://github.com/angular/angular-cli/issues/5986

https://github.com/angular/angular-cli/issues/5998

Either wait for a fix, or work around it. Work around idea: Put a single file module in the app project, which brings in the external package. Route to this little placeholder/ship.

kylecordes commented 7 years ago

Tried and failed:

Create a local TypeScript file which re-exports the module from the other package, as a local "proxy".

This does not work, AOT still fails.

kylecordes commented 6 years ago

Lazy loaded routes works, AOT works.

Many improvements were made to CLI, and Nx configures things behind the scenes to work within the constraints that still remain.