mirror of
https://github.com/chenqinggang001/claude-code-build.git
synced 2026-08-05 12:30:22 +08:00
fix: 添加 ignoreDCEAnnotations 修复 Bun 1.3.x barrel 优化导致的运行时崩溃
Bun 1.3.10+ 对 sideEffects:false 的包(lodash-es, @growthbook/growthbook) 启用了自动 barrel 优化,过度 tree-shaking 导致 default export 声明被移除, 运行时报 ReferenceError: default169 is not defined。 设置 ignoreDCEAnnotations: true 禁用此行为。 Ref: https://github.com/oven-sh/bun/issues/27709 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c901db8159
commit
b9273538ca
@@ -56,6 +56,7 @@ const result = await Bun.build({
|
||||
format: 'esm',
|
||||
sourcemap: 'linked',
|
||||
minify: false,
|
||||
ignoreDCEAnnotations: true, // Disable aggressive tree-shaking of sideEffects:false packages (lodash-es, @growthbook/growthbook) — fixes Bun 1.3.x barrel optimization bug
|
||||
define,
|
||||
external: [
|
||||
// Only mark packages as external if they are:
|
||||
|
||||
Vendored
+8795
-7529
File diff suppressed because it is too large
Load Diff
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user