Vite optimized dependencies changed and reloading many times #14801
Replies: 10 comments 8 replies
-
Hmm, if possible try switching to |
Beta Was this translation helpful? Give feedback.
-
I don't think this is specific to a particular framework/library/setup/platform. We recently upgraded to Vite 5.4.11 (no other changes) in a large Vue3 app and started seeing this issue also. We see messages about Lodash as well, but also other 3rd-party libs like AG-Grid, Vue-multiselect, and fuse.js. It's incredibly annoying, and happens frequently during development locally. Can't the reloading be disabled somehow? |
Beta Was this translation helpful? Give feedback.
-
I'm still seeing this. Why is this closed?? |
Beta Was this translation helpful? Give feedback.
-
Alo seeing this |
Beta Was this translation helpful? Give feedback.
-
This is driving me insane, constant reoptimizing of dependencies causes Cloudflare's
|
Beta Was this translation helpful? Give feedback.
-
Also running into this. Using pnpm as well. My project is nascent though, and has very few dependencies. It means that every time I load my app in dev for the first time, it shows an error, and then it works on a reload. |
Beta Was this translation helpful? Give feedback.
-
I use npm run dev and it happens as well, I use Nuxt + Vite and I'm getting this stuff happening... It's unbearable what am I supposed to do to avoid that |
Beta Was this translation helpful? Give feedback.
-
Yeah this on-demand optimization might seem like a smart way to speed up runtime of a project, but not when Vite just reloads randomly without question, throwing away built-up user state forcing the user to start over. I'd much rather have a 10 second "please wait" screen than this. Can it be configured? |
Beta Was this translation helpful? Give feedback.
-
Facing the same issue in my React Project. React: v19.1.0 1:56:39 PM [vite] (client) ✨ new dependencies optimized: next-themes, sonner, jotai, jotai/utils, axios, date-fns-tz, date-fns, react-icons/io5, react-icons/hi, react-icons/hi2, @radix-ui/react-popover, react-icons/fa, @radix-ui/react-slot, class-variance-authority, react-hook-form, @hookform/resolvers/zod, zod, clsx, tailwind-merge, react-calendar
1:56:39 PM [vite] (client) ✨ optimized dependencies changed. reloading
1:58:42 PM [vite] (client) ✨ new dependencies optimized: react-phone-number-input/input, lucide-react, @radix-ui/react-label, @radix-ui/react-alert-dialog, @radix-ui/react-toggle-group, @radix-ui/react-accordion, react-day-picker, @radix-ui/react-toggle
1:58:42 PM [vite] (client) ✨ optimized dependencies changed. reloading |
Beta Was this translation helpful? Give feedback.
-
It's not clear to me why it needs to detect new dependencies on-the-fly in the first place? Wouldn't it make more sense to watch the file system and immediately optimize new dependencies after they get installed? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm encountering an issue when trying to start my monorepo project using the package manager
pnpm
.Surprisingly, Vite repeatedly refreshes due to changes in optimized dependencies, as depicted in the attached screenshot below:
I've attempted various solutions, including:
pnpm vite --force
lodash
(and some other libraries that I suspected might be causing the frequent reloads) tooptimizeDeps.include
(I also tried the exclude option, but the problem persisted).Unfortunately, none of these methods have resolved the issue. Would anyone be able to provide some guidance on this matter?
Thank you.
My system:
My
vite.config.ts
:Beta Was this translation helpful? Give feedback.
All reactions