perf: faster dev startup and lighter bundle
- Switch dev default to Turbopack (5-14x faster compile); keep webpack as dev:webpack - Tailwind v4 source() base so JIT scans identically under both bundlers - Lazy-load @xyflow/react via next/dynamic to keep it out of the shared bundle - optimizePackageImports for heavy barrel imports (xyflow, dnd-kit, material-symbols, marked) - Replace blind setTimeout waits with TCP health-check (waitServerReady) - Run checkForUpdate in parallel instead of blocking server spawn - Background MITM/tunnel/cloudflared kills off the critical path Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,6 +30,8 @@ const nextConfig = {
|
||||
proxyClientMaxBodySize,
|
||||
// Cache fetch responses across HMR refreshes for faster dev reloads.
|
||||
serverComponentsHmrCache: true,
|
||||
// Tree-shake heavy barrel imports to cut compile + bundle size
|
||||
optimizePackageImports: ["@xyflow/react", "@dnd-kit/core", "@dnd-kit/sortable", "material-symbols", "marked"],
|
||||
},
|
||||
webpack: (config, { isServer }) => {
|
||||
// Ignore fs/path modules in browser bundle
|
||||
|
||||
Reference in New Issue
Block a user