simondotm / nx-firebase

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

Serve target needs to build synchronously before launching emulator #28

Closed simondotm closed 1 year ago

simondotm commented 3 years ago

serve process ideally needs to be:

  1. build synchronously, then
  2. build --watch & start emulator asynchronously.
johngrimsey commented 2 years ago

Nx solves this for you:

"serve": {
  "builder": "@nrwl/workspace:run-commands",
  "options": {
    "commands": [
      "nx run firebase:build --watch && echo 'WATCHING'",
      "nx run firebase:emulate"
    ],
    "readyWhen": "WATCHING",
    "parallel": true
  }
},
simondotm commented 1 year ago

Latest plugin version has a (hacky) solution for this so closing.