Skip to content
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

Publish style support for Single page apps #1755

Open
roleyfoley opened this issue Aug 24, 2021 · 0 comments
Open

Publish style support for Single page apps #1755

roleyfoley opened this issue Aug 24, 2021 · 0 comments

Comments

@roleyfoley
Copy link
Contributor

Expected Behaviour

When publishing an SPA I can make use of build time environment injection that is available from some SPA frameworks like React which has the following support
https://create-react-app.dev/docs/adding-custom-environment-variables/

In this model if you have specific environment variables in your shell at build time they are made available to the code through the process.env variable within javascript. When these lookups occur react will repalce the lookup with the environment variable value.

Current Behaviour

Currently we only offer run time configuration options through the use of the config.json file. While this approach does remove the need to rebuild the code it isn't considered to be a maintainable solution for some application implementations

Possible Solution

Add the ability to define the deploy process for the spa component. This can either be buildonce or buildondeploy. build once is the current model where we generate a config file and place it in a know location. build on deploy will use the code repository as a the image and on each deployment, copy the code repositry to a temp directory, export the settings as environment variables and then run the provided publish command to create the spa deployment.

Context

This provides flexability in the application deployment process and allows teams to choose the approach they would like to take.

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

No branches or pull requests

1 participant