Vite 5 build fails Could not resolve inside monorepo
pnpm 9.4 workspace, Node 20.11, Vite 5.2. Building the web app fails with: Error: Could not resolve "@acme/ui" from src/App.tsx. The package is a local workspace package, symlinked in node_modules, and TypeScript resolves it fine. Only Vite build (rollup) complains. Dev server works. Adding it to optimizeDeps.include did nothing for the build. Anyone know what config knob this is? I have spent more time on this than I want to admit.
4 replies