@umijs/plugins 4.0.16 → 4.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/qiankun/slave.js +16 -28
- package/package.json +3 -3
package/dist/qiankun/slave.js
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
7
|
var __export = (target, all) => {
|
|
25
8
|
for (var name in all)
|
|
26
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -140,15 +123,19 @@ export interface IRuntimeConfig {
|
|
|
140
123
|
});
|
|
141
124
|
api.modifyDefaultConfig((memo) => {
|
|
142
125
|
var _a, _b, _c;
|
|
143
|
-
const initialSlaveOptions =
|
|
144
|
-
devSourceMap: true
|
|
145
|
-
|
|
146
|
-
|
|
126
|
+
const initialSlaveOptions = {
|
|
127
|
+
devSourceMap: true,
|
|
128
|
+
...JSON.parse(process.env.INITIAL_QIANKUN_SLAVE_OPTIONS || "{}"),
|
|
129
|
+
...(memo.qiankun || {}).slave
|
|
130
|
+
};
|
|
131
|
+
const modifiedDefaultConfig = {
|
|
132
|
+
...memo,
|
|
147
133
|
runtimePublicPath: true,
|
|
148
|
-
qiankun:
|
|
134
|
+
qiankun: {
|
|
135
|
+
...memo.qiankun,
|
|
149
136
|
slave: initialSlaveOptions
|
|
150
|
-
}
|
|
151
|
-
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
152
139
|
const shouldNotModifyDefaultBase = ((_b = (_a = api.userConfig.qiankun) == null ? void 0 : _a.slave) == null ? void 0 : _b.shouldNotModifyDefaultBase) ?? initialSlaveOptions.shouldNotModifyDefaultBase;
|
|
153
140
|
const historyType = ((_c = api.userConfig.history) == null ? void 0 : _c.type) || "browser";
|
|
154
141
|
if (!shouldNotModifyDefaultBase && historyType !== "hash") {
|
|
@@ -159,9 +146,10 @@ export interface IRuntimeConfig {
|
|
|
159
146
|
api.modifyConfig((config) => {
|
|
160
147
|
var _a, _b;
|
|
161
148
|
if (config.mfsu !== false) {
|
|
162
|
-
config.mfsu =
|
|
149
|
+
config.mfsu = {
|
|
150
|
+
...config.mfsu,
|
|
163
151
|
mfName: ((_a = config.mfsu) == null ? void 0 : _a.mfName) || `mf_${(_b = api.pkg.name) == null ? void 0 : _b.replace(/^@/, "").replace(/\W/g, "_")}`
|
|
164
|
-
}
|
|
152
|
+
};
|
|
165
153
|
}
|
|
166
154
|
return config;
|
|
167
155
|
});
|
|
@@ -234,10 +222,10 @@ export { connectMaster } from './connectMaster';
|
|
|
234
222
|
});
|
|
235
223
|
api.addMiddlewares(async () => {
|
|
236
224
|
return async (req, res, next) => {
|
|
237
|
-
var _a;
|
|
225
|
+
var _a, _b;
|
|
238
226
|
const qiankunConfig = api.config.qiankun || {};
|
|
239
227
|
const masterEntry = (_a = qiankunConfig.slave) == null ? void 0 : _a.masterEntry;
|
|
240
|
-
const isMasterApp = qiankunConfig.master.enable;
|
|
228
|
+
const isMasterApp = (_b = qiankunConfig.master) == null ? void 0 : _b.enable;
|
|
241
229
|
const { proxyToMasterEnabled } = await api.applyPlugins({
|
|
242
230
|
key: "shouldProxyToMaster",
|
|
243
231
|
type: api.ApplyPluginsType.modify,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.17",
|
|
4
4
|
"description": "@umijs/plugins",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/plugins#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@ant-design/antd-theme-variable": "^1.0.0",
|
|
28
28
|
"@ant-design/icons": "^4.7.0",
|
|
29
29
|
"@ant-design/pro-layout": "^7.0.1-beta.28",
|
|
30
|
-
"@umijs/bundler-utils": "4.0.
|
|
30
|
+
"@umijs/bundler-utils": "4.0.17",
|
|
31
31
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
32
32
|
"axios": "^0.27.2",
|
|
33
33
|
"babel-plugin-import": "^1.13.5",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"warning": "^4.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"umi": "4.0.
|
|
49
|
+
"umi": "4.0.17"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|