chore(front): remove vite-plugin-checker background TS/ESLint checks (#18437)

## Summary

Removes `vite-plugin-checker` and all references to
`VITE_DISABLE_TYPESCRIPT_CHECKER` / `VITE_DISABLE_ESLINT_CHECKER`.

These background checks are no longer needed because our dev experience
now relies on **independent** linters and type-checkers:
- `npx nx lint:diff-with-main twenty-front` for ESLint
- `npx nx typecheck twenty-front` for TypeScript

Running these as separate processes (rather than inside Vite) is faster,
gives cleaner output, and avoids the significant memory overhead that
`vite-plugin-checker` introduces during `vite dev` and `vite build`. The
old env vars to disable them are removed from `vite.config.ts`,
`package.json` scripts, `nx.json`, `.env.example`, and all translated
docs.
This commit is contained in:
Charles Bochet 2026-03-05 18:55:04 +01:00 committed by GitHub
parent c53a13417e
commit 1affa1e004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 5 additions and 75 deletions

View file

@ -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"
},

View file

@ -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:**

View file

@ -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` فقط
**إذا لم يعمل ذلك:**

View file

@ -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:**

View file

@ -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:**

View file

@ -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:**

View file

@ -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 :**

View file

@ -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:**

View file

@ -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` のみを実行してください。
**うまくいかない場合:**

View file

@ -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`만 실행하십시오.
**작동하지 않는 경우:**

View file

@ -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:**

View file

@ -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ă:**

View file

@ -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`
**Если это не работает:**

View file

@ -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:**

View file

@ -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`
**如果不起作用:**

View file

@ -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"

View file

@ -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"
}

View file

@ -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<typeof checker>[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}'],