Skip to content

Build: Streamline frontend config #999

@jimbojw

Description

@jimbojw

Background: Currently, in order to build the frontend workspace, one needs to create two files: index.html and firebase_config.ts. There are example files for each (index.example.html and firebase_config.example.ts). Minimally, one must copy the example files to build. The files themselves are .gitignored to prevent committing.

This design does prevent marginally sensitive values from being committed to the repo (such as the Firebase API key). However, it does not take full advantage of Webpack's ability to perform substitutions and inject environment variables.

Proposal:

  1. Delete both *.example.* files.
  2. Remove the exclusions from .gitignore.
  3. Make both files depend on Webpack-injected fields (no hard coded secrets).
  4. Check in the config-based files.
  5. Update GitHub Actions (`ci.yaml') as needed to build using the streamlined procedure.
  6. Update the Google Cloud Build (cloudbuild.yaml) as needed.
  7. Update documentation on how to build and deploy based on the updated method.

It may make sense to create files like firebase_config.dev.json and firebase_config.prod.json, the latter of which would be .gitignored. Then, in the Webpack build, bring in these files' contents for the particular kind of build being performed.

See #996 for discussion on streamlining the frontend build process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions