perf(build): measure the homepage and fix optimizePackageImports
/ is the highest-traffic route but was missing from both the public-route instrumentation and the JS size budgets, so a payload regression there could never fail the build. It is now wrapped in withPublicPagePerformance and budgeted alongside the other public routes. optimizePackageImports listed date-fns, which is not a dependency (a no-op), while omitting the barrel-heavy packages that are actually imported: motion, @dnd-kit/core, @dnd-kit/sortable and @tanstack/react-virtual.
This commit is contained in:
1 parent
bb3799f705
commit
a32cf6119b
4 files changed
+19
-2
No files matched your search
+9
-1
@@ -158,7 +158,15 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
|
||||
experimental: {
|
||||
optimizePackageImports: ["lucide-react", "date-fns"],
|
||||
// Barrel-heavy packages: without this every import pulls the whole
|
||||
// module graph into the chunk that first touches it.
|
||||
optimizePackageImports: [
|
||||
"lucide-react",
|
||||
"motion",
|
||||
"@dnd-kit/core",
|
||||
"@dnd-kit/sortable",
|
||||
"@tanstack/react-virtual",
|
||||
],
|
||||
useTypeScriptCli: true,
|
||||
hideLogsAfterAbort: true,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user