Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Investigate creating prebuilt frontend package #2822

Closed
KlapTrap opened this issue Aug 13, 2018 · 4 comments
Closed

Investigate creating prebuilt frontend package #2822

KlapTrap opened this issue Aug 13, 2018 · 4 comments

Comments

@KlapTrap
Copy link
Contributor

KlapTrap commented Aug 13, 2018

Should we:

  1. Pre-build anything at all?
  2. Pre-build just the frontend
    Have a mechanism that ensures we deploy a compatible version of the backend when using a prebuilt app.
  3. Pre-build frontend and backend
    Needs a build for every environment (windows, linux, macos etc)
@KlapTrap
Copy link
Contributor Author

Currently we disable aot for cf push due to memory limits in the build stage. Having a pre-build frontend would mean we could always have aot turn on (the angular team recommends this).

@KlapTrap
Copy link
Contributor Author

PR that added aot: #2594

@nwmac
Copy link
Contributor

nwmac commented Aug 13, 2018

I'm not a fan of pre-building the front-end - its still code that is compiled, just as the backend is - it feels it goes against the CF philosophy and buildpacks.

That said, we do have an issue that the front end build with AOT and build optimisation is resource intensive - we try and limit the memory, but the result is the build time often exceeds the 15 minutes allowed by CF.

I think CF should have separate quotes for staging an app versus running it - that way we could allocate more resource for building - but it does not.

We believe Angular 7 (Sept/Oct) will improve build performance - but until that is released we can't gauge what the improvement (if any) is.

Hence, we are considering allowing the front-end (minimally) to be pre-built.

The simplest option (front-end only) is to have an npm target that you run to pre-build the front-end app and which also adds some marker file which the buildpack then uses to know to use the prebuilt UI and skip the build for it.

@nwmac
Copy link
Contributor

nwmac commented Aug 21, 2018

@nwmac nwmac closed this as completed Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants