Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/src/case/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ function defaultOptions(
force: false
}
},
inlineConst: true,
lazyBarrel: true
inlineConst: true
}
} as TCompilerOptions<ECompilerType.Rspack>;

Expand Down
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/src/case/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ export function defaultOptions(
force: false
}
},
inlineConst: true,
lazyBarrel: true
inlineConst: true
}
};
}
Expand Down
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/src/case/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ function defaultOptions<T extends ECompilerType.Rspack>(
force: false
}
},
inlineConst: true,
lazyBarrel: true
inlineConst: true
}
} as TCompilerOptions<T>;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/src/case/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ function defaultOptions(
force: false
}
},
inlineConst: true,
lazyBarrel: true
inlineConst: true
}
};
}
Expand Down
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/src/case/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,7 @@ function defaultOptions(
force: false
}
},
inlineConst: true,
lazyBarrel: true
inlineConst: true
}
} as TCompilerOptions<ECompilerType.Rspack>;
if (custom) {
Expand Down
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/src/case/hot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ function defaultOptions(
force: false
}
},
inlineConst: true,
lazyBarrel: true
inlineConst: true
}
} as TCompilerOptions<ECompilerType.Rspack>;

Expand Down
1 change: 0 additions & 1 deletion packages/rspack-test-tools/src/case/normal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ function defaultOptions<T extends ECompilerType.Rspack>(
asyncWebAssembly: true,
topLevelAwait: true,
inlineConst: true,
lazyBarrel: true,
// CHANGE: rspack does not support `backCompat` yet.
// backCompat: false,
// CHANGE: Rspack enables `css` by default.
Expand Down
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/src/case/stats-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ function defaultOptions(
force: false
}
},
inlineConst: true,
lazyBarrel: true
inlineConst: true
}
} as TCompilerOptions<ECompilerType.Rspack>;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack/src/config/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const applyExperimentsDefaults = (
D(experiments, "typeReexportsPresence", false);

// IGNORE(experiments.lazyBarrel): Rspack specific configuration for lazy make side effects free barrel file
D(experiments, "lazyBarrel", false);
D(experiments, "lazyBarrel", true);
};

const applybundlerInfoDefaults = (
Expand Down
2 changes: 1 addition & 1 deletion tests/rspack-test/defaultsCases/default/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
},
inlineConst: false,
inlineEnum: false,
lazyBarrel: false,
lazyBarrel: true,
lazyCompilation: false,
parallelCodeSplitting: false,
parallelLoader: false,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ export default {
<ApiMeta addedVersion="1.5.0" />

- **Type:** `boolean`
- **Default:** `false`
- **Default:** `true` (enabled by default after v1.6.0)

Whether to skip building unused re-export modules in side-effect-free barrel files to optimize build performance.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/config/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ export default {
<ApiMeta addedVersion="1.5.0" />

- **类型:** `boolean`
- **默认值:** `false`
- **默认值:** `true` (v1.6.0 后默认开启)

是否跳过无副作用的重导出模块(barrel file)中未被使用到的模块的构建,以优化构建性能。

Expand Down
Loading