Conversation
The main noticeable change in the removal of `@nguniversal/module-map-ngfactory-loader`. This is because now in Angular 8 we support standard import syntax which no longer require custom logic to support lazy loading.
Example
```ts
loadChildren: () => import('./lazy/lazy.module').then(m => m.LazyModule)
```
instead of
```ts
loadChildren: './lazy/lazy.module#LazyModule'
```
01d9b0e to
d4e4241
Compare
| "sourceMap": false, | ||
| "optimization": { | ||
| "scripts": false, | ||
| "styles": true |
There was a problem hiding this comment.
We should always optimize components css in server builds.
|
//cc @CaerusKaru |
|
We should also probably update the schematics not to add this dependency |
|
Hi - We are already making few other changes to the schematic to make this work. Can you refer to vikerman/v8-lazy@515239b for other changes required to make this work - Essentially moving all dependencies to @angular and @nguniversal out of server.ts in to main.ts. This is required for dynamic imports to properly work on the server or it would fail due to Angular being bundled as two copies in server.ts bundle and main.ts bundle.
|
|
@vikerman would you please review and add essentials actions to this PR? It's a while Angular 8 is out, and still, we can't use it with SSR. |
The main noticeable change in the removal of
@nguniversal/module-map-ngfactory-loader. This is because now in Angular 8 we support standard import syntax which no longer require custom logic to support lazy loading.Example
instead of
loadChildren: './lazy/lazy.module#LazyModule'