-
-
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
Hot reload not reloading for aliased imports #6235
Comments
Updated environment from beta 2 to 3.1 since this has persisted |
Maybe you're using WSL2, I don't know but I have the same issue then I change back to use WSL1, and it's worked. To see what WSL version are you on (open PowerShell by admin): |
I'm using Ubuntu, but perhaps something changed in your Linux subsystem configuration when you made the switch. In any case I don't have this issue with other bundlers, so I think it's a parcel related issue. |
Two problems I see:
|
Thanks for the suggestions Devon, I'll check these out and report back |
@devongovett, I tried your suggestions and point 2 was part of the issue. I really appreciate you sharing it! Although I don't understand why parcel needs a full path vs relative to the project root. AFAICT, this nuance needs documented. Now that it's working, a few things stick out to me:
For point 1, I was aware that it short circuits, but in the past this caused some errors. Seems it's been fixed in beta 3.1 :) |
Seems like this was fixed in the v2 release. Closing now. |
🐛 bug report
I'm attempting to run the parcel dev server using a resolver I wrote for typescript tsconfig paths. However, the watcher does not detect changes in files resolved through an alias. You can see my repo here.
Update: updating my resolver to use absolute paths (in place of relative to the src root) fixes the watcher (albeit with significant performance drop), but the reload part of hot-reloading continues to be an issue.
🎛 Configuration (.babelrc, package.json, cli command)
Running
parcel src/index.html
to start. No babel configuration.🤔 Expected Behavior
Parcel should hot-reload when changes are made in a file referenced through a resolved alias.
😯 Current Behavior
Changes are
not detectednot reloaded in files referenced through a resolved alias. No error.💁 Possible Solution
I believe HMR should function the same as a build when it comes to resolving files.
🔦 Context
The context is that my
index.ts
imports from@components/App
, which is aliased in mytsconfig.js
. This builds fine, and I don't want to move my paths topackage.json
💻 Code Sample
My repo: https://github.com/zachbryant/react-starter
Specifically, look in
src/index.tsx
andarc/components/App.tsx
.🌍 Your Environment
The text was updated successfully, but these errors were encountered: