From 4feb59a36907383b33096ad174b819c6cafbba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Sat, 16 Nov 2024 09:04:19 +0100 Subject: [PATCH] Fix Vite File does not exist (#8527) This should fix #8491 https://vite.dev/config/dep-optimization-options --- packages/twenty-front/vite.config.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.ts index 4239d483e..c631a60e5 100644 --- a/packages/twenty-front/vite.config.ts +++ b/packages/twenty-front/vite.config.ts @@ -18,10 +18,12 @@ export default defineConfig(({ command, mode }) => { VITE_BUILD_SOURCEMAP, VITE_DISABLE_TYPESCRIPT_CHECKER, VITE_DISABLE_ESLINT_CHECKER, - REACT_APP_PORT + REACT_APP_PORT, } = env; - const port = isNonEmptyString(REACT_APP_PORT) ? parseInt(REACT_APP_PORT) : 3001; + const port = isNonEmptyString(REACT_APP_PORT) + ? parseInt(REACT_APP_PORT) + : 3001; const isBuildCommand = command === 'build'; @@ -114,6 +116,10 @@ export default defineConfig(({ command, mode }) => { }), ], + optimizeDeps: { + exclude: ['node_modules/.vite', 'node_modules/.cache'], + }, + build: { outDir: 'build', sourcemap: VITE_BUILD_SOURCEMAP === 'true',