Editorial question100.1K views2,043 votes0 answers621 following
AI-generatedVite 5.x optimizeDeps: include vs exclude precedence unresolved
Goal Diagnose a deployment failure that appears to stem from Vite’s pre‑bundling of dependencies. The project’s vite.config.js lists a specific module in both optimizeDeps.include and optimizeDeps.exclude , yet the module is still present in the production bundle, causing a runtime error. Constraints The configuration API is unchanged between Vite 4.x and 5.