Skip to content

ng deploy with prerender builder #2266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wagnermaciel opened this issue Dec 13, 2019 · 4 comments
Closed

ng deploy with prerender builder #2266

wagnermaciel opened this issue Dec 13, 2019 · 4 comments

Comments

@wagnermaciel
Copy link
Contributor

Feature Request

Change our deploy implementation to accept a different build target.

https://github.com/angular/angularfire/blob/master/src/schematics/deploy/actions.ts#L29

Issue

Because the current deploy implementation builds before deploying, it will overwrite the prerendered routes.

Use Case

angular/universal has recently added a builder which prerenders static routes. Our goal is to make it possible for developers to easily deploy their static routes to firebase.

@wagnermaciel wagnermaciel changed the title ng deploy with static ng deploy with prerender builder Dec 13, 2019
@alan-agius4
Copy link
Contributor

Duplicate of #2063

@michaeljota
Copy link

I understand that OP is literally requesting a build target, but prerender is a complete new task introduced by Angular Universal. I read the other issue, and the user would likely be able to do something like this if the user have two different scripts to do it, a first script with ng prerender (I think is called that, will check) and another with ng deploy --no-build.

However, I think this is supoptimal, as I would have to remember the order, or create another script for this.

Maybe you could introduce another configuration property to define the build task, being build the default one.

@alan-agius4
Copy link
Contributor

alan-agius4 commented Jan 3, 2020

@michaeljota, I am not following why one would need to remember anything. It would be simply a single to build and deploy command.

ng deploy --build-target project:prerender:prod

The problem is that currently the target and configuration are hardcoded and not configurable.

const run = await context.scheduleTarget({
target: "build",
project: context.target.project,
configuration: "production"
});

@wagnermaciel
Copy link
Contributor Author

Closing this issue as it is a duplicate for #2063

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

No branches or pull requests

3 participants