simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

How to integrate an angular app into nx-firebase app? #149

Closed scowling closed 9 months ago

scowling commented 9 months ago

I can't find any information on how to do this - so either it's so easy and I'm missing something, or it's a stupid idea and no one has tried it.

Either way I'm stuck - any pointers?

Among other things I have tried adding an angular app in and building to [nx-firebase-app]/public - no luck

simondotm commented 9 months ago

Hi @scowling - you should build your angular app to /dist as usual Then modify your firebase.json config hosting to deploy from the /dist folder where your angular app is

I will add some examples at some point, but theres more info here: https://github.com/simondotm/nx-firebase/blob/main/docs/nx-firebase-hosting.md

simondotm commented 9 months ago

example firebase.json config

  "hosting": [
    {
      "target": "your-firebase-site",
      "public": "dist/apps/web/your-angular-project",
      "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
      "rewrites": [
        {
          "source": "**",
          "destination": "/index.html"
        }
      ]
    },
simondotm commented 9 months ago

Closing as resolved.