-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serve or build in --watch
mode does not watch dependent libraries also
#20
Comments
Theres a rumour this used to work on Nx v11.x , but I cant find the github issue I spotted with this info in it |
It's Nx issue 5762 |
Copying the issue so the related fix can be tracked: nrwl/nx#5762 |
Recent Nx changes offer some new possibilities here, observer on the tsc process could be just the ticket |
Great project!!! I've solved this issue outside nx by building the library INTO the functions folder. Not sure this strategy would work in this case. I see you're copying the built library only once. Any chance to update it on every change as well? I wrote my recipe for the non-nx solution, hope it could be of use. Let me know If I can get involved somehow. Auto-refreshing the firebase functions is a dream of mine. |
Thanks for sharing your approach, and yes, I'd love to get this working somehow. Building libraries directly into the functions folder is a neat idea but doesn't feel quite right as a solution for Nx workspaces since we cant always be sure a given buildable library won't be a dependency of multiple apps in the workspace. Generally seems like we'll need to somehow figure out how an nx plugin can watch specific folders or dependencies (we do know all of the target libraries that a functions application depends on, so thats a good start) and then run its own logic (copying the updated lib outputs in our case) whenever there's a change detected. Reading the comments in various Nx threads though atm, I get the feeling this functionality exists but is a little bit fragile - keeps working, then not working across recent releases. I'm tempted to see how Nx team resolve some of these features, and then we can follow their examples. I'm always open to ideas though! |
See #95 |
Scenario:
Functions project depends on
node-library
Run
build --with-deps --watch
Changes to dependencies and/or main application code result in inconsistent rebuilds
Look into nx-watch plugin to resolve this
https://gist.github.com/jhesgodi/2d530753c551ace665a8c3010d3a719c
The text was updated successfully, but these errors were encountered: