simondotm / nx-firebase

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

Add `serve` executor #140

Closed simondotm closed 10 months ago

simondotm commented 10 months ago

Added a simple serve executor to workaround the Nx issue with SIGINT (#40) so that CTRL+C when serving shuts down the Firebase Emulator properly.

This executor spawns the watch target and emulate target commands directly, without using nx:run-commands (which is the cause of the issue)

To use the executor, make the following change to your project.json for your firebase app:

The executor uses your existing project configuration to run watch and serve target commands.

Note: This executor is experimental and intended to be a temporary solution until Nx fixes the process exit issue.