@umijs/plugins 4.0.0-canary.20230216.1 → 4.0.0-canary.20230217.1
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/access.js +4 -0
- package/dist/dva.js +4 -0
- package/dist/locale.js +4 -0
- package/dist/mf.js +1 -0
- package/dist/model.js +4 -0
- package/dist/moment2dayjs.js +5 -0
- package/dist/qiankun/master.js +7 -0
- package/dist/qiankun/slave.js +7 -2
- package/dist/qiankun.js +4 -0
- package/dist/react-query.js +4 -0
- package/dist/styled-components.js +4 -0
- package/dist/utils/astUtils.js +4 -0
- package/dist/utils/localeUtils.js +2 -0
- package/dist/utils/modelUtils.js +5 -0
- package/dist/valtio.js +4 -0
- package/libs/qiankun/master/MicroApp.tsx +2 -1
- package/package.json +3 -3
package/dist/access.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/dva.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/locale.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/mf.js
CHANGED
|
@@ -109,6 +109,7 @@ function mf(api) {
|
|
|
109
109
|
});
|
|
110
110
|
api.onGenerateFiles(() => {
|
|
111
111
|
api.writeTmpFile({
|
|
112
|
+
// ref https://webpack.js.org/concepts/module-federation/#infer-publicpath-from-script
|
|
112
113
|
content: `/* infer remote public */;
|
|
113
114
|
__webpack_public_path__ = document.currentScript.src + '/../';`,
|
|
114
115
|
path: mfSetupPathFileName
|
package/dist/model.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/moment2dayjs.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -38,6 +42,7 @@ var moment2dayjs_default = (api) => {
|
|
|
38
42
|
return Joi.alternatives().try(
|
|
39
43
|
Joi.object({
|
|
40
44
|
preset: Joi.string(),
|
|
45
|
+
// 'antd' | 'antdv3 | 'none'
|
|
41
46
|
plugins: Joi.array()
|
|
42
47
|
}),
|
|
43
48
|
Joi.boolean().invalid(true)
|
package/dist/qiankun/master.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -130,6 +134,7 @@ export const setMasterOptions = (newOpts) => options = ({ ...options, ...newOpts
|
|
|
130
134
|
});
|
|
131
135
|
api.writeTmpFile({
|
|
132
136
|
path: "MicroAppLoader.tsx",
|
|
137
|
+
// 开启了 antd 插件的时候,使用 antd 的 loader 组件,否则提示用户必须设置一个自定义的 loader 组件
|
|
133
138
|
content: api.isPluginEnable("antd") ? getFileContent("AntdLoader.tsx") : `export default function Loader() { console.warn(\`[plugins/qiankun]: Seems like you'r not using @umijs/plugin-antd, you need to provide a custom loader or set autoSetLoading false to shut down this warning!\`); return null; }`
|
|
134
139
|
});
|
|
135
140
|
[
|
|
@@ -150,6 +155,8 @@ export const setMasterOptions = (newOpts) => options = ({ ...options, ...newOpts
|
|
|
150
155
|
context: {
|
|
151
156
|
dynamicRoot: false,
|
|
152
157
|
hasModelPlugin: api.isPluginEnable("model")
|
|
158
|
+
// dynamicRoot:
|
|
159
|
+
// api.config.exportStatic && api.config.exportStatic.dynamicRoot,
|
|
153
160
|
}
|
|
154
161
|
});
|
|
155
162
|
} else {
|
package/dist/qiankun/slave.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -51,7 +55,7 @@ function handleOriginalHtml(api, microAppEntry, originalHtml) {
|
|
|
51
55
|
);
|
|
52
56
|
const $ = import_utils.cheerio.load(originalHtml);
|
|
53
57
|
$("head").prepend(
|
|
54
|
-
`<script>window.__QIANKUN_DEVELOPMENT__=true
|
|
58
|
+
`<script>window.__QIANKUN_DEVELOPMENT__=true</script>
|
|
55
59
|
<script type="extra-qiankun-config">${JSON.stringify({
|
|
56
60
|
master: {
|
|
57
61
|
apps: [
|
|
@@ -71,7 +75,7 @@ function handleOriginalHtml(api, microAppEntry, originalHtml) {
|
|
|
71
75
|
],
|
|
72
76
|
prefetch: false
|
|
73
77
|
}
|
|
74
|
-
})}
|
|
78
|
+
})}</script>`
|
|
75
79
|
);
|
|
76
80
|
return api.applyPlugins({
|
|
77
81
|
key: "modifyMasterHTML",
|
|
@@ -139,6 +143,7 @@ export interface IRuntimeConfig {
|
|
|
139
143
|
};
|
|
140
144
|
const modifiedDefaultConfig = {
|
|
141
145
|
...memo,
|
|
146
|
+
// 默认开启 runtimePublicPath,避免出现 dynamic import 场景子应用资源地址出问题
|
|
142
147
|
runtimePublicPath: true,
|
|
143
148
|
qiankun: {
|
|
144
149
|
...memo.qiankun,
|
package/dist/qiankun.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/react-query.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/utils/astUtils.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/utils/modelUtils.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -210,6 +214,7 @@ ${modelProps.join("\n")}
|
|
|
210
214
|
}
|
|
211
215
|
};
|
|
212
216
|
var ModelUtils = _ModelUtils;
|
|
217
|
+
// https://github.com/umijs/umi/issues/9837
|
|
213
218
|
ModelUtils.topologicalSort = (models) => {
|
|
214
219
|
const graph = [];
|
|
215
220
|
const namespaceToNode = {};
|
package/dist/valtio.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -144,7 +144,7 @@ export const MicroApp = forwardRef(
|
|
|
144
144
|
const stateForSlave = (useModel || noop)(
|
|
145
145
|
qiankunStateForSlaveModelNamespace,
|
|
146
146
|
);
|
|
147
|
-
const { entry, props: propsFromConfig = {} } = appConfig || {};
|
|
147
|
+
const { entry, props: { settings: settingsFromConfig = {}, ...propsFromConfig } = {} } = appConfig || {};
|
|
148
148
|
|
|
149
149
|
useEffect(() => {
|
|
150
150
|
setComponentError(null);
|
|
@@ -152,6 +152,7 @@ export const MicroApp = forwardRef(
|
|
|
152
152
|
const configuration = {
|
|
153
153
|
globalContext: window,
|
|
154
154
|
...globalSettings,
|
|
155
|
+
...settingsFromConfig,
|
|
155
156
|
...settingsFromProps,
|
|
156
157
|
};
|
|
157
158
|
microAppRef.current = loadMicroApp(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.20230217.1",
|
|
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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@ant-design/pro-components": "^2.0.1",
|
|
30
30
|
"@tanstack/react-query": "^4.22.0",
|
|
31
31
|
"@tanstack/react-query-devtools": "^4.22.0",
|
|
32
|
-
"@umijs/bundler-utils": "4.0.0-canary.
|
|
32
|
+
"@umijs/bundler-utils": "4.0.0-canary.20230217.1",
|
|
33
33
|
"@umijs/valtio": "^1.0.3",
|
|
34
34
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
35
35
|
"axios": "^0.27.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"antd": "^4.24.1",
|
|
56
|
-
"umi": "4.0.0-canary.
|
|
56
|
+
"umi": "4.0.0-canary.20230217.1"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|