Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

feat: update to Angular 8 #679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alan-agius4
Copy link
Contributor

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

loadChildren: () => import('./lazy/lazy.module').then(m => m.LazyModule)

instead of

loadChildren: './lazy/lazy.module#LazyModule'

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'
```
"sourceMap": false,
"optimization": {
"scripts": false,
"styles": true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should always optimize components css in server builds.

@alan-agius4
Copy link
Contributor Author

//cc @CaerusKaru

@alan-agius4
Copy link
Contributor Author

We should also probably update the schematics not to add this dependency

@vikerman vikerman self-requested a review June 4, 2019 18:02
@vikerman
Copy link
Contributor

vikerman commented Jun 5, 2019

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.

  • Will look into removing the ModuleMapLoader from the schematics - But it's not breaking anything for now
  • Turning on CSS animations is a good idea

@m98
Copy link
Contributor

m98 commented Jun 20, 2019

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants