simondotm / nx-firebase

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

Solving the `--watch` issue for `serve` target #95

Closed simondotm closed 1 year ago

simondotm commented 1 year ago

Ok, after some research there's no obvious solution for getting the serve target to watch dependent libs within Nx workspaces prior to 15.4.x, and I dont intend to pursue it.

The good news is that for anyone using the plugin in an Nx workspace 15.4.x+, we have a solution with nx watch:

nx watch --projects=<firebase-app-project> --includeDependentProjects -- nx build <firebase-app-project> --clean=false

This command watches the project, and rebuilds it whenever there is a change in the primary project or any of its dependencies. Neato.

seanaguinaga commented 1 year ago

Brilliant!

Thank you

I was just running the build command again to get new changes but this is perfect

Thanks for all the hard work with this plugin 🙏

simondotm commented 1 year ago

The plugin app generator now uses this solution for serve targets as a default when the host workspace is Nx 15.4.x+