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
#5037 introduced a regression where, in very specific circumstances, the page is fully reloaded instead of a specific module being refreshed.
Using Vite 2.6.0-beta.0 (correct behaviour)
Screen.Recording.2021-09-24.at.12.51.12.pm.mov
Using Vite 2.6.0-beta.2 (incorrect behaviour)
Screen.Recording.2021-09-24.at.12.51.56.pm.mov
Reproduction
I tried very hard to reproduce this in a simple app, but I wasn't able to. It seems to be a particular pattern that React Preview exhibits, potentially because of its heavy usage of virtual files. Also, it uses a /preview/ prefix in its Vite configuration.
Force vite@2.6.0-beta.2 with the following in package.json:
"resolutions": {
"vite": "2.6.0-beta.2"
}
Install deps
Run yarn reactpreview -v and open http://localhost:8120/?p=src/screens/pick-restaurant/PickRestaurant.tsx:PickRestaurant then update SearchBar.tsx as shown in the video. Notice the full reload.
Potential cause
I noticed that #5037 removed some url.replace(base, '/') calls. I'm not sure what they were for, but reverting just these two lines seems to fix everything. I'll send a PR and we can discuss there?
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
#5037 introduced a regression where, in very specific circumstances, the page is fully reloaded instead of a specific module being refreshed.
Using Vite 2.6.0-beta.0 (correct behaviour)
Screen.Recording.2021-09-24.at.12.51.12.pm.mov
Using Vite 2.6.0-beta.2 (incorrect behaviour)
Screen.Recording.2021-09-24.at.12.51.56.pm.mov
Reproduction
I tried very hard to reproduce this in a simple app, but I wasn't able to. It seems to be a particular pattern that React Preview exhibits, potentially because of its heavy usage of virtual files. Also, it uses a
/preview/
prefix in its Vite configuration.To reproduce:
vite@2.6.0-beta.2
with the following in package.json:yarn reactpreview -v
and openhttp://localhost:8120/?p=src/screens/pick-restaurant/PickRestaurant.tsx:PickRestaurant
then updateSearchBar.tsx
as shown in the video. Notice the full reload.Potential cause
I noticed that #5037 removed some
url.replace(base, '/')
calls. I'm not sure what they were for, but reverting just these two lines seems to fix everything. I'll send a PR and we can discuss there?System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: