🔨 chore: Enable webpackBuildWorker to optimize build memory#9350
Conversation
|
@sxjeru is attempting to deploy a commit to the LobeHub OSS Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR enables Next.js's webpackBuildWorker option in next.config.ts to offload build processing to a worker thread and reduce memory usage, particularly addressing out-of-memory issues on Cloudflare Pages. Class diagram for updated Next.js configuration optionsclassDiagram
class NextConfig {
+serverMinification: boolean
+webVitalsAttribution: string[]
+webpackBuildWorker: boolean
+webpackMemoryOptimizations: boolean
+headers(): Promise<any>
}
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
👍 @sxjeru Thank you for raising your pull request and contributing to our Community |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9350 +/- ##
=========================================
Coverage 79.75% 79.75%
=========================================
Files 822 822
Lines 53141 53141
Branches 7120 5759 -1361
=========================================
Hits 42382 42382
Misses 10759 10759
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
❤️ Great PR @sxjeru ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
|
🎉 This PR is included in version 1.139.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…9350) Enable webpackBuildWorker in next.config.ts
…ession (#14804) Vite 8.0.13 bumps rolldown to 1.0.1, which ships a new chunk-optimization dedupe pass (rolldown #9305) with an unsound sibling-dynamic-entry handling — see rolldown #9350 (open). This causes preload-deps entries (m.f in __vite__mapDeps) to be dropped, leaving null slots; at runtime any dynamic import that hits the shrunken table fires import(null) and throws "Failed to resolve module specifier 'null'", taking down every tRPC call that flows through src/libs/trpc/client/lambda.ts headers (await import('@/services/_auth')). Because the repo runs with lockfile=false + resolution-mode=highest, ^8.0.9 silently floats to 8.0.13 on every fresh Vercel build. Pin exactly to 8.0.12 (which uses rolldown 1.0.0) until rolldown 1.0.2 / Vite 8.0.14 lands a fix. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ession (lobehub#14804) Vite 8.0.13 bumps rolldown to 1.0.1, which ships a new chunk-optimization dedupe pass (rolldown lobehub#9305) with an unsound sibling-dynamic-entry handling — see rolldown lobehub#9350 (open). This causes preload-deps entries (m.f in __vite__mapDeps) to be dropped, leaving null slots; at runtime any dynamic import that hits the shrunken table fires import(null) and throws "Failed to resolve module specifier 'null'", taking down every tRPC call that flows through src/libs/trpc/client/lambda.ts headers (await import('@/services/_auth')). Because the repo runs with lockfile=false + resolution-mode=highest, ^8.0.9 silently floats to 8.0.13 on every fresh Vercel build. Pin exactly to 8.0.12 (which uses rolldown 1.0.0) until rolldown 1.0.2 / Vite 8.0.14 lands a fix. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
https://nextjs.org/docs/app/guides/memory-usage#webpack-build-worker
这边 Vercel 基本没遇到 OOC,但 Cloudflare Pages 不加该参数必定 OOC 。有待进一步测试。📝 补充信息 | Additional Information
Summary by Sourcery
Build: