You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I haven't had a chance to play with Tauri yet so I used this as an excuse to fiddle around a bit. It seems super neat! That said, I can't reproduce this. Do you maybe have a repo I can look at? Tailwind and Vite both detect changes and don't throw errors:
Okay, so I tracked this down and it appears that Tauri is actively changing the current working directory of the node process outside of node. This is a problem because the OS and Node disagree on what the current working directory for the process actually is:
I produced the above by tweaking the Tailwind CSS source:
We can sorta fix this by making sure resolvedChangeFiles always uses absolute paths but this has other implications. It can potentially break other things, even in Node JS, that assume that the current working directory of the node process is accurately returned by process.cwd() when it is not.
One of the problems with this is that this fix may not even work in the future if the internals of fast-glob change and step outside of node at all to resolve paths. But at least for now it seems generally fine.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.