Skip to content

The open alternative to Salesforce, designed for AI.

Fix API playground not loading (#10891)

Charles Bochet2b89273241dd
diff --git a/packages/twenty-front/package.json b/packages/twenty-front/package.json
index c88a46e289b..22eb520cb9a 100644
--- a/packages/twenty-front/package.json
+++ b/packages/twenty-front/package.json
@@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
- "build": "VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=4000 npx vite build && sh ./scripts/inject-runtime-env.sh",
- "build:sourcemaps": "VITE_BUILD_SOURCEMAP=true VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=6000 npx vite build && sh ./scripts/inject-runtime-env.sh",
+ "build": "VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=4500 npx vite build && sh ./scripts/inject-runtime-env.sh",
+ "build:sourcemaps": "VITE_BUILD_SOURCEMAP=true VITE_DISABLE_TYPESCRIPT_CHECKER=true VITE_DISABLE_ESLINT_CHECKER=true NODE_OPTIONS=--max-old-space-size=7000 npx vite build && sh ./scripts/inject-runtime-env.sh",
"start:prod": "NODE_ENV=production npx vite --host",
"tsup": "npx tsup"
},
diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.ts
index 01120205574..e694870eaed 100644
--- a/packages/twenty-front/vite.config.ts
+++ b/packages/twenty-front/vite.config.ts
@@ -146,7 +146,15 @@ export default defineConfig(({ command, mode }) => {
outDir: 'build',
sourcemap: VITE_BUILD_SOURCEMAP === 'true',
rollupOptions: {
- external: ['@scalar/api-reference-react'],
+ output: {
+ manualChunks: (id: string) => {
+ if (id.includes('@scalar')) {
+ return 'scalar';
+ }
+
+ return null;
+ },
+ },
},
},