diff --git a/nx.json b/nx.json index 7519bf837d..f251531669 100644 --- a/nx.json +++ b/nx.json @@ -147,7 +147,7 @@ "outputs": ["{projectRoot}/{options.output-dir}"], "options": { "cwd": "{projectRoot}", - "command": "NODE_OPTIONS='--max-old-space-size=10240' VITE_DISABLE_TYPESCRIPT_CHECKER=true storybook build --test", + "command": "NODE_OPTIONS='--max-old-space-size=10240' storybook build --test", "output-dir": "storybook-static", "config-dir": ".storybook" }, diff --git a/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdx index 62d67b7b6d..d21c150b16 100644 --- a/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdx @@ -66,9 +66,6 @@ This should work out of the box with the eslint extension installed. If this doe #### While running `npx nx start` or `npx nx start twenty-front`, Out of memory error is thrown -In `packages/twenty-front/.env` uncomment `VITE_DISABLE_TYPESCRIPT_CHECKER=true` to disable background checks thus reducing amount of needed RAM. - -**If it does not work:** Run only the services you need, instead of `npx nx start`. For instance, if you work on the server, run only `npx nx worker twenty-server` **If it does not work:** diff --git a/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdx index 3bf00d4c35..5f4a075d18 100644 --- a/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ git config --global core.autocrlf false #### أثناء تشغيل `npx nx start` أو `npx nx start twenty-front`، ظهرت خطأ نفاد الذاكرة -في `packages/twenty-front/.env` قم بإزالة تعليق على `VITE_DISABLE_TYPESCRIPT_CHECKER=true` و`VITE_DISABLE_ESLINT_CHECKER=true` لتعطيل فحوصات الخلفية مما يقلل من كمية الذاكرة المطلوبة. - -**إذا لم يعمل ذلك:** قم بتشغيل الخدمات التي تحتاجها فقط، بدلاً من `npx nx start`. على سبيل المثال، إذا كنت تعمل على الخادم، قم بتشغيل `npx nx worker twenty-server` فقط **إذا لم يعمل ذلك:** diff --git a/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdx index 90da88d552..66975bcd0e 100644 --- a/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdx @@ -66,9 +66,6 @@ Toto by mělo fungovat přímo s nainstalovaným rozšířením eslint. Pokud to #### Při spuštění `npx nx start` nebo `npx nx start twenty-front` došlo k chybě nedostatku paměti -In `packages/twenty-front/.env` uncomment `VITE_DISABLE_TYPESCRIPT_CHECKER=true` and `VITE_DISABLE_ESLINT_CHECKER=true` to disable background checks thus reducing amount of needed RAM. - -**Pokud to nefunguje:** Spusťte pouze služby, které potřebujete, místo `npx nx start`. Například pokud pracujete na serveru, spusťte pouze `npx nx worker twenty-server` **Pokud to nefunguje:** diff --git a/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdx index 8d011c7b5b..21efd8efc3 100644 --- a/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ Normalerweise sollte dies sofort mit der installierten eslint-Erweiterung funkti #### Beim Ausführen von `npx nx start` oder `npx nx start twenty-front` wird ein Speicherfehler angezeigt -Kommentieren Sie in `packages/twenty-front/.env` `VITE_DISABLE_TYPESCRIPT_CHECKER=true` und `VITE_DISABLE_ESLINT_CHECKER=true` aus, um Hintergrundprüfungen zu deaktivieren und den RAM-Bedarf zu reduzieren. - -**Wenn es nicht funktioniert:** Führen Sie nur die Services aus, die Sie benötigen, anstatt `npx nx start`. Wenn Sie zum Beispiel am Server arbeiten, führen Sie nur `npx nx worker twenty-server` aus. **Wenn es nicht funktioniert:** diff --git a/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdx index 6aa989676f..bee2a9d795 100644 --- a/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ Esto debería funcionar sin configuración adicional con la extensión de ESLint #### Al ejecutar `npx nx start` o `npx nx start twenty-front`, se produce un error de falta de memoria -En `packages/twenty-front/.env` descomente `VITE_DISABLE_TYPESCRIPT_CHECKER=true` y `VITE_DISABLE_ESLINT_CHECKER=true` para deshabilitar las comprobaciones en segundo plano y así reducir la cantidad de RAM necesaria. - -**Si no funciona:** Ejecute solo los servicios que necesite, en lugar de `npx nx start`. Por ejemplo, si trabaja en el servidor, ejecute solo `npx nx worker twenty-server` **Si no funciona:** diff --git a/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdx index 5cf1d384e3..22d630e0ab 100644 --- a/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ Cela devrait fonctionner directement avec l'extension eslint installée. Si cela #### Pendant l'exécution de `npx nx start` ou `npx nx start twenty-front`, une erreur de mémoire est renvoyée -Dans `packages/twenty-front/.env`, décommentez `VITE_DISABLE_TYPESCRIPT_CHECKER=true` et `VITE_DISABLE_ESLINT_CHECKER=true` pour désactiver les vérifications en arrière-plan, réduisant ainsi la quantité de RAM nécessaire. - -**Si cela ne fonctionne pas :** Lancez uniquement les services dont vous avez besoin, au lieu de `npx nx start`. Par exemple, si vous travaillez sur le serveur, lancez seulement `npx nx worker twenty-server` **Si cela ne fonctionne pas :** diff --git a/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdx index 15e13ab08d..19bc35cfa7 100644 --- a/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdx @@ -66,9 +66,6 @@ Questo dovrebbe funzionare direttamente con l'estensione eslint installata. Se q #### Durante l'esecuzione di `npx nx start` o `npx nx start twenty-front`, viene generato un errore di memoria insufficiente -In `packages/twenty-front/.env` decommentare `VITE_DISABLE_TYPESCRIPT_CHECKER=true` e `VITE_DISABLE_ESLINT_CHECKER=true` per disabilitare i controlli in background riducendo così la quantità di RAM necessaria. - -**If it does not work:** Run only the services you need, instead of `npx nx start`. Ad esempio, se lavori sul server, esegui solo `npx nx worker twenty-server` **If it does not work:** diff --git a/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdx index 0cd20cdad8..45bf418fa3 100644 --- a/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdx @@ -69,9 +69,6 @@ eslint拡張子がインストールされている場合、これは標準設 #### `npx nx start` または `npx nx start twenty-front` 実行中にメモリエラーが発生 -`packages/twenty-front/.env`で`VITE_DISABLE_TYPESCRIPT_CHECKER=true` と `VITE_DISABLE_ESLINT_CHECKER=true` をコメント解除して、バックグラウンドチェックを無効化し、必要なRAMの量を減らします。 - -**うまくいかない場合:** `npx nx start` の代わりに、必要なサービスだけを実行してください。 例えば、サーバーで作業している場合は、`npx nx worker twenty-server` のみを実行してください。 **うまくいかない場合:** diff --git a/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdx index 91608b308c..ff1f38af29 100644 --- a/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ eslint 확장 프로그램이 설치된 상태에서는 기본 설정으로 작 #### `npx nx start` 또는 `npx nx start twenty-front` 실행 시 메모리 부족 오류 발생 -`packages/twenty-front/.env`에서 `VITE_DISABLE_TYPESCRIPT_CHECKER=true`와 `VITE_DISABLE_ESLINT_CHECKER=true`를 주석 해제하여 백그라운드 검사 기능을 비활성화하여 필요한 RAM의 양을 줄입니다. - -**작동하지 않는 경우:** `npx nx start` 대신 필요한 서비스만 실행하십시오. 예를 들어, 서버에서 작업하는 경우, `npx nx worker twenty-server`만 실행하십시오. **작동하지 않는 경우:** diff --git a/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdx index 4f76404a50..9c2a82fbd0 100644 --- a/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ Isso deve funcionar automaticamente com a extensão eslint instalada. Se isso n #### Ao executar `npx nx start` ou `npx nx start twenty-front`, é lançada uma mensagem de erro de falta de memória -No `packages/twenty-front/.env` descomente `VITE_DISABLE_TYPESCRIPT_CHECKER=true` para desativar verificações em segundo plano, reduzindo assim a quantidade de RAM necessária. - -**Se não funcionar:** Execute apenas os serviços que precisar, em vez de `npx nx start`. Por exemplo, se estiver trabalhando no servidor, execute apenas `npx nx worker twenty-server` **Se não funcionar:** diff --git a/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdx index 2c1a800ad7..38b8334690 100644 --- a/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdx @@ -66,9 +66,6 @@ Acesta ar trebui să funcționeze implicit cu extensia eslint instalată. Dacă #### În timpul rulării `npx nx start` sau `npx nx start twenty-front`, apare o eroare Out of memory -În `packages/twenty-front/.env` decomentați `VITE_DISABLE_TYPESCRIPT_CHECKER=true` și `VITE_DISABLE_ESLINT_CHECKER=true` pentru a dezactiva verificările de fundal, astfel reducând cantitatea de RAM necesară. - -**Dacă nu funcționează:** Rulați doar serviciile de care aveți nevoie, în loc de `npx nx start`. De exemplu, dacă lucrați la server, rulați doar `npx nx worker twenty-server` **Dacă nu funcționează:** diff --git a/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdx index 41f3c1dc89..7290631d10 100644 --- a/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdx @@ -66,9 +66,6 @@ git config --global core.autocrlf false #### При запуске `npx nx start` или `npx nx start twenty-front` возникает ошибка нехватки памяти -В `packages/twenty-front/.env` раскомментируйте `VITE_DISABLE_TYPESCRIPT_CHECKER=true` и `VITE_DISABLE_ESLINT_CHECKER=true`, чтобы отключить фоновые проверки, таким образом уменьшая количество необходимой оперативной памяти. - -**Если это не работает:** Запускайте только те сервисы, которые вам нужны, вместо `npx nx start`. Например, если вы работаете на сервере, запускайте только `npx nx worker twenty-server` **Если это не работает:** diff --git a/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdx index 7c30a2883a..aa50b5e41e 100644 --- a/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ Bu, kurulu eslint uzantısıyla kutudan çıktığı anda çalışmalıdır. Bu #### `npx nx start` veya `npx nx start twenty-front` çalıştırırken, bellek hatası verildi -`packages/twenty-front/.env` içinde `VITE_DISABLE_TYPESCRIPT_CHECKER=true` ve `VITE_DISABLE_ESLINT_CHECKER=true`'i açarak arka plan kontrollerini devre dışı bırakın, böylece gerekli RAM miktarını azaltın. - -**Bu işe yaramazsa:** Yalnızca ihtiyaç duyduğunuz hizmetleri çalıştırın, `npx nx start` yerine. Örneğin, sunucuda çalışıyorsanız yalnızca `npx nx worker twenty-server` çalıştırın. **Bu işe yaramazsa:** diff --git a/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdx index ab13f4fc9f..d316388bef 100644 --- a/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdx +++ b/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdx @@ -65,9 +65,6 @@ git config --global core.autocrlf false #### 运行 `npx nx start` 或 `npx nx start twenty-front` 时,出现内存不足错误 -在 `packages/twenty-front/.env` 中取消注释 `VITE_DISABLE_TYPESCRIPT_CHECKER=true` 以禁用后台检查,从而减少所需的 RAM 量。 - -**如果不起作用:** 仅运行您需要的服务,而不是 `npx nx start`。 例如,如果您在服务器上工作,仅运行 `npx nx worker twenty-server` **如果不起作用:** diff --git a/packages/twenty-front/.env.example b/packages/twenty-front/.env.example index f7e35a852f..03038ef1c3 100644 --- a/packages/twenty-front/.env.example +++ b/packages/twenty-front/.env.example @@ -5,7 +5,6 @@ VITE_BUILD_SOURCEMAP=false # ———————— Optional ———————— # REACT_APP_PORT=3001 # CHROMATIC_PROJECT_TOKEN= -# VITE_DISABLE_TYPESCRIPT_CHECKER=true # VITE_ENABLE_SSL=false # VITE_HOST=localhost.com # SSL_KEY_PATH="./certs/your-cert.key" diff --git a/packages/twenty-front/package.json b/packages/twenty-front/package.json index 7befdd44e9..c2fd40d5a8 100644 --- a/packages/twenty-front/package.json +++ b/packages/twenty-front/package.json @@ -3,8 +3,8 @@ "private": true, "type": "module", "scripts": { - "build": "NODE_ENV=production VITE_DISABLE_TYPESCRIPT_CHECKER=true NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh", - "build:sourcemaps": "NODE_ENV=production VITE_BUILD_SOURCEMAP=true VITE_DISABLE_TYPESCRIPT_CHECKER=true NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh", + "build": "NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh", + "build:sourcemaps": "NODE_ENV=production VITE_BUILD_SOURCEMAP=true NODE_OPTIONS=--max-old-space-size=8192 npx vite build && sh ./scripts/inject-runtime-env.sh", "start:prod": "NODE_ENV=production npx serve -s build", "tsup": "npx tsup" }, @@ -152,7 +152,6 @@ "optionator": "^0.9.1", "playwright": "^1.56.1", "rollup-plugin-visualizer": "^5.14.0", - "vite-plugin-checker": "^0.10.2", "vite-plugin-svgr": "^4.3.0", "vite-tsconfig-paths": "^4.2.1" } diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.ts index 0c5f55010b..12adee6521 100644 --- a/packages/twenty-front/vite.config.ts +++ b/packages/twenty-front/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { lingui } from '@lingui/vite-plugin'; import { isNonEmptyString } from '@sniptt/guards'; import react from '@vitejs/plugin-react-swc'; @@ -12,20 +11,17 @@ import { type PluginOption, searchForWorkspaceRoot, } from 'vite'; -import checker from 'vite-plugin-checker'; import svgr from 'vite-plugin-svgr'; import tsconfigPaths from 'vite-tsconfig-paths'; import { createWywProfilingPlugin } from 'twenty-shared/vite'; -type Checkers = Parameters[0]; -export default defineConfig(({ command, mode }) => { +export default defineConfig(({ mode }) => { const env = loadEnv(mode, __dirname, ''); const { REACT_APP_SERVER_BASE_URL, VITE_BUILD_SOURCEMAP, - VITE_DISABLE_TYPESCRIPT_CHECKER, VITE_HOST, SSL_CERT_PATH, SSL_KEY_PATH, @@ -37,12 +33,6 @@ export default defineConfig(({ command, mode }) => { ? parseInt(REACT_APP_PORT) : 3001; - const isBuildCommand = command === 'build'; - - const tsConfigPath = isBuildCommand - ? path.resolve(__dirname, './tsconfig.build.json') - : path.resolve(__dirname, './tsconfig.json'); - const CHUNK_SIZE_WARNING_LIMIT = 1024 * 1024; // 1MB // Please don't increase this limit for main index chunk // If it gets too big then find modules in the code base @@ -50,26 +40,11 @@ export default defineConfig(({ command, mode }) => { const MAIN_CHUNK_SIZE_LIMIT = 6.8 * 1024 * 1024; // 6.8MB for main index chunk const OTHER_CHUNK_SIZE_LIMIT = 5 * 1024 * 1024; // 5MB for other chunks - const checkers: Checkers = { - overlay: false, - }; - - if (VITE_DISABLE_TYPESCRIPT_CHECKER === 'true') { - console.log( - `VITE_DISABLE_TYPESCRIPT_CHECKER: ${VITE_DISABLE_TYPESCRIPT_CHECKER}`, - ); - } - if (VITE_BUILD_SOURCEMAP === 'true') { + // eslint-disable-next-line no-console console.log(`VITE_BUILD_SOURCEMAP: ${VITE_BUILD_SOURCEMAP}`); } - if (VITE_DISABLE_TYPESCRIPT_CHECKER !== 'true') { - checkers['typescript'] = { - tsconfigPath: tsConfigPath, - }; - } - return { root: __dirname, cacheDir: '../../node_modules/.vite/packages/twenty-front', @@ -108,7 +83,6 @@ export default defineConfig(({ command, mode }) => { lingui({ configPath: path.resolve(__dirname, './lingui.config.ts'), }), - checker(checkers), createWywProfilingPlugin( wyw({ include: [path.resolve(__dirname, 'src') + '/**/*.{ts,tsx}'],