-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
parcel 2 doesn't notice files changed in modules included via file: ../something
and caches them until the cache is removed
#5628
Comments
Symlinked folders outside the root aren't watched: #4950 And I didn't know |
Parcel doesn't watch files outside the project root. I guess ../mymodule fits that case? |
Oh shoot, sorry for the duplicate issue then. I didn't know either it just symlinked. But what speaks against just resolving the symlinks and treating them as relative paths? You did that to fix the module duplication issue when running build, so why not for serve too? |
Another tiny bug I found: if you rename the module to my_module everywhere and remove its package.json the underscore will not show up in the error message but make the text italic |
-> #4057
https://github.com/parcel-bundler/watcher/ has to start at some directory which is watched for changes recursively. And no OS resolves symlinks in that process (what you described). |
I see, thanks for explaining. Why does it need to watch a directory? Parcel should know all files it includes (it prints them when building with --detailed-report) it could then resolve their real location and just watch the included files? |
|
To 1: Then resolve the file's location and watch the parent directory Also as a side note, if you're saying it watches directories that makes me curios what would happen if a file would be on a strange filesystem like sshfs inside of a large folder where the OS doesn't load the contents when only a single file is accessed. |
No
Anyway, this is a duplicate of #4950. |
🐛 bug report
clear cache for fresh start
run serve
check consistency of input / output
npm run serve has built evereything as expected.
Now edit
../mymodule/file.js
and change the string inside alert. I have changed it toI'M HIDING FROM PARCEL
Run npm run serve again or just keep it running, it doesn't matter
check output for consistency
Parcel cached where it shouldn't. The output does not show what it should.
This has probably cost me soon 20 minutes of debugging in vain because I fell for it multiple times.
Same result running it again:
The only way to unstuck it is to remove .parcel-cache
🎛 Configuration (.babelrc, package.json, cli command)
Sorry, you will need to check the attached reproduction repo
Worthy excerpt:
🤔 Expected Behavior
The output code should update when the input code changes
😯 Current Behavior
It does not update
💁 Possible Solution
Update the output when the input changes, even in modules included via
..
.🔦 Context
I have a "lib" directory which I include as module and I always wonder why I am stupid when I change code in there but my issues still persist.
💻 Code Sample
parcel-cache-bug.zip
🌍 Your Environment
The text was updated successfully, but these errors were encountered: