Skip to content

Commit 3b62c58

Browse files
committed
fix: update references from api.config to api.userConfig in child.ts for runtime configuration
1 parent 2be1a92 commit 3b62c58

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/child.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ export interface IRuntimeConfig {
123123
//
124124
api.addHTMLHeadScripts(() => {
125125
const dontModify =
126-
api.config.qiankun?.child?.shouldNotModifyRuntimePublicPath;
126+
api.userConfig.qiankun?.child?.shouldNotModifyRuntimePublicPath;
127127
return dontModify
128128
? []
129129
: [
130130
`
131131
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
132132
window.publicPath = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${
133-
api.config.publicPath || '/'
133+
api.userConfig.publicPath || '/'
134134
}";`,
135135
];
136136
});
@@ -141,8 +141,8 @@ export interface IRuntimeConfig {
141141
// mfsu 线上不会开启,所以这里只需要判断本地是否开启即可
142142
const {
143143
shouldNotAddLibraryChunkName = api.env === 'production' ||
144-
!api.config.mfsu,
145-
} = api.config.qiankun?.child || {};
144+
!api.userConfig.mfsu,
145+
} = api.userConfig.qiankun?.child || {};
146146
config.output
147147
.libraryTarget('umd')
148148
.library(
@@ -178,8 +178,8 @@ export interface IRuntimeConfig {
178178
api.addEntryCode(() => [
179179
`
180180
export const bootstrap = qiankun_genBootstrap(render);
181-
export const mount = qiankun_genMount('${api.config.mountElementId}');
182-
export const unmount = qiankun_genUnmount('${api.config.mountElementId}');
181+
export const mount = qiankun_genMount('${api.userConfig.mountElementId}');
182+
export const unmount = qiankun_genUnmount('${api.userConfig.mountElementId}');
183183
export const update = qiankun_genUpdate();
184184
if (!window.__POWERED_BY_QIANKUN__) {
185185
bootstrap().then(mount);

0 commit comments

Comments
 (0)