perf(build): split vendor chunks and strip debug logs from production bundle

- manualChunks separates react/wouter, react-query, recharts and lucide
  from application code: the main bundle drops from 1.73 MB to 1.08 MB and
  vendor chunks stay browser-cached across deployments since they only
  change on dependency upgrades
- esbuild "pure" removes console.log/console.debug from production builds
  (console.warn/error kept); the Dockerfile now builds the frontend with
  NODE_ENV=production so the setting actually applies — this silences the
  debug-log flood users saw in the browser console in production

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHdE9nEh8zHhQNGpCgrtYe
This commit is contained in:
Claude committed 2026-08-14 16:20:29 +00:00
1 parent f5bc114a82
commit 9dc6d9567c
2 files changed
+21 -1

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ RUN ls -la server/
# Build the application
# Build frontend first
RUN npx vite build
RUN NODE_ENV=production npx vite build
# Vérifier que les fichiers sont construits
RUN echo "=== BUILD VERIFICATION ===" && \