Skip to content

Commit 08f5853

Browse files
committed
Disable Rollup tree-shaking to prevent code removal
1 parent e0f102e commit 08f5853

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.config/rollup.base.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ export default function baseConfig(extendConfig = {}) {
133133
}
134134

135135
return {
136+
// Disable tree-shaking to prevent incorrect removal of code.
137+
// Without this, Rollup may incorrectly remove code that appears unused
138+
// but is actually accessed dynamically or through other means.
139+
treeshake: false,
136140
external(rawId) {
137141
const id = normalizeId(rawId)
138142
const pkgName = getPackageName(

0 commit comments

Comments
 (0)