Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(qiankun): 线上环境默认启用 shouldNotAddLibraryChunkName #11690

Merged
merged 1 commit into from
Sep 26, 2023
Merged
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: 2 additions & 1 deletion packages/plugins/src/qiankun/slave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ export interface IRuntimeConfig {
assert(api.pkg.name, 'You should have name in package.json.');
// 默认不修改 library chunk 的 name,从而确保可以通过 window[appName] 访问到导出
// mfsu 关闭的时候才可以修改,否则可能导致配合 mfsu 时,子应用的 umd chunk 无法被正确加载
const { shouldNotAddLibraryChunkName = !Boolean(api.config.mfsu) } = (api.config.qiankun || {}).slave!;
// mfsu 线上不会开启,所以这里只需要判断本地是否开启即可
const { shouldNotAddLibraryChunkName = api.env === 'production' || !Boolean(api.config.mfsu) } = (api.config.qiankun || {}).slave!;
config.output
.libraryTarget('umd')
.library(
Expand Down
Loading