Skip to content

The open alternative to Salesforce, designed for AI.

Fix Vite File does not exist (#8527)

Félix Malfait4feb59a36907
diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.ts
index 4239d483e6f..c631a60e55a 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',