Skip to content
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

feat(web): use daemon file-watcher for file-server executors #14284

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

Phillip9587
Copy link
Contributor

@Phillip9587 Phillip9587 commented Jan 11, 2023

TODO

  • Check if daemon is available and fallback to @parcel/watcher or chokidar when not available.

Current Behavior

file-server executors of the angular and web package use chokidar to watch the app and lib directory

Expected Behavior

file-server executors use the daemon file-watcher

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Jan 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Aug 29, 2023 1:30pm

@Phillip9587
Copy link
Contributor Author

@Cammisuli If the daemon is not available a fallback watcher using @parcel/watcher or chokidar has to be implemented. Can we make that a util somewhere in the nx package? It also has to be implemented for the nx graph --watch command.

I would suggest using chokidar because the parcel watcher does not work in for example stackblitz like environments (parcel-bundler/watcher#99)

@Phillip9587
Copy link
Contributor Author

Also it think it should be considered deprecating the file-server executor in the @nrwl/angular package and migrating usages to the @nrwl/web file-server to reduce code duplication accross the repo.

@Cammisuli Cammisuli marked this pull request as ready for review August 29, 2023 13:31
@Cammisuli Cammisuli requested a review from a team as a code owner August 29, 2023 13:31
@Cammisuli Cammisuli requested a review from jaysoo August 29, 2023 13:31
@Cammisuli
Copy link
Member

Sorry for the incredibly long delay here 😅

The daemon has become much more stable the last couple of months, so having a fallback to use chokidar or parcel isn't needed at the moment.

There's still an issue with Stackblitz, but that's a bigger picture beyond the scope of this PR where the core of Nx needs to support wasm.

@Cammisuli
Copy link
Member

Verified that changing dependent projects will rerun the main watch, just as intended 😄

@jaysoo jaysoo changed the title feat: use daemon file-watcher for file-server executors feat(web): use daemon file-watcher for file-server executors Aug 30, 2023
@jaysoo jaysoo merged commit 660f0a6 into nrwl:master Aug 30, 2023
3 checks passed
@Phillip9587 Phillip9587 deleted the file-server-daemon-watcher branch August 30, 2023 16:31
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants