-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
caching and serving a previous version #15409
Comments
Hello @j2l. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
I've seen this happening before when switching between Vite projects, and I haven't really figured out why it happens, but if we want to keep an issue to track this behaviour, it should have a reproduction so others can try to fix this too. |
I understand, but since I have no idea how this can happen, and there are so many pieces in movement, I can't make it reproductible. |
There is no cache in Vite that would explicitly trigger this. Except my only hunch is the browser's cache of certain modules that triggered it to fetch old modules, though Vite isn't setting any cache headers for source files to cause that. Plus, Vite respects the etag so only files that matches the transformed content in the new app is used. It definitely looks like a caching issue though, but afaik isn't something Vite does intentionally. |
thank you @bluwy |
Describe the bug
Using svelte,
npm run dev
(vite), I stumbled on a weird case where I have an error about a variable I used (hierarchy2), that doesn't exist anymore in App.svelte since a few version iterations:I tried with another fresh browser and have the same issue, so it's not the browser cache.
I also tried by changing the file name (App.svelte) to something else and call it in main.ts, it didn't fix it.
An also tried
vite --force
,npm cache clean --force
without luck.Is there a cache in vite? How to clear it?
Or is it elsewhere?
Reproduction
impossible
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: