Cloudflare vite plugin and optimizeDeps don't seem to work.
I have a RR7 app that I just migrated to the Cloudflare vite plugin (historically used the Remix cloudflare dev proxy). When I run the app, it tries to optimize deps, and is extremely slow (program reload that Vite triggers are really slow when combined with the Cloudflare runtime startup). I've tried everything to get the dependencies to optimize ahead of time configuring vite OptimizeDeps in every ways possible. I discussed with the Vite and RR7 teams, nothing seems to work.
Right now I'm wondering if there's something in the Cloudflare plugin preventing optimizeDeps from working. I see in the source code it sets optimizeDeps but mostly for excludes, and doesn't seem to mess with includes. You can see the behavior if you create a new RR7 app using the react-router-template "cloudflare". If you clear the vite cache and run the app, you'll see dependencies getting optimized lazily, and you won't be able to prevent them from doing so even configuring optimizeDeps.
Not sure its an issue with the Cloudflare vite plugin, but no one else seems to know whats up