Universal: Should we have ng add @angular/universal similar to @angular/pwa?

Created on 4 Jun 2018  路  4Comments  路  Source: angular/universal

I'm submitting a ...

- [x] feature request

For support of ng add @angular/universal schematic.

It would be great to get the boilerplate out of the box and support for features like lazy-loading and prerendering w/o minimal effort.

What modules are related to this Issue?

- [x] common
- [x] express-engine
- [x] module-map-ngfactory-loader
- [x] Prerender

Current behavior?

I would like to have a ng add @angular/universal schematic

ng new morningharwood --routing
ng generate universal --client-project morningharwood
ng generate app-shell  --route=app-shell-path --client-project=morningharwood
ng add @angular/pwa --project morningharwood
ng build --prod

Expected behavior?

ng new morningharwood --routing
ng add @angular/universal --prerender --express --project morningharwood
ng add @angular/pwa --project morningharwood
ng build --prod

From this, we could get the canonical files needed to do basic universal prerendering of an angular cli project.

Other information (optional)

it would be amazing if this could work with nx too (but we'll prob have to talk to them)!

nice-to-have common days Needs Design

Most helpful comment

The first draft of the Express Engine schematic is in #1051 and can be tracked there

All 4 comments

Yup that's we we mean by https://github.com/angular/universal/issues/968
At this stage we're planning on doing one for the Express engine, from there we'll look at doing the others.
The idea is that we wouldn't need the universal-starter anymore with the right schematics in place

I already implemented the 'first beta' of that here: https://github.com/maciejtreder/ng-toolkit/tree/master/schematics/universal

Any help is more then welcome :)

The first draft of the Express Engine schematic is in #1051 and can be tracked there

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings