@umijs/plugins 4.0.0-canary.20220325.1 → 4.0.0-canary.20220412.3
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 +3 -3
- package/dist/initial-state.js +2 -2
- package/dist/qiankun/slave.js +9 -11
- package/package.json +7 -7
package/dist/access.js
CHANGED
|
@@ -45,9 +45,9 @@ export function accessProvider(container) {
|
|
|
45
45
|
}
|
|
46
46
|
`,
|
|
47
47
|
});
|
|
48
|
-
// index.
|
|
48
|
+
// index.tsx
|
|
49
49
|
api.writeTmpFile({
|
|
50
|
-
path: 'index.
|
|
50
|
+
path: 'index.tsx',
|
|
51
51
|
content: `
|
|
52
52
|
import React from 'react';
|
|
53
53
|
import { AccessContext } from './context';
|
|
@@ -66,7 +66,7 @@ export const Access: React.FC<AccessProps> = (props) => {
|
|
|
66
66
|
throw new Error('[access] the \`accessible\` property on <Access /> should be a boolean');
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
return props.accessible ? props.children : props.fallback
|
|
69
|
+
return <>{ props.accessible ? props.children : props.fallback }</>;
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export const useAccessMarkedRoutes = (routes: IRoute[]) => {
|
package/dist/initial-state.js
CHANGED
|
@@ -30,8 +30,8 @@ exports.default = (api) => {
|
|
|
30
30
|
import React from 'react';
|
|
31
31
|
import { useModel } from '@@/plugin-model';
|
|
32
32
|
${loading
|
|
33
|
-
? `import Loading from ${loading}`
|
|
34
|
-
: `function Loading() { return <div
|
|
33
|
+
? `import Loading from '${loading}'`
|
|
34
|
+
: `function Loading() { return <div />; }`}
|
|
35
35
|
export default function InitialStateProvider(props: any) {
|
|
36
36
|
const appLoaded = React.useRef(false);
|
|
37
37
|
const { loading = false } = useModel("@@initialState") || {};
|
package/dist/qiankun/slave.js
CHANGED
|
@@ -57,17 +57,15 @@ exports.default = (api) => {
|
|
|
57
57
|
}
|
|
58
58
|
return config;
|
|
59
59
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// return publicPathStr;
|
|
70
|
-
// });
|
|
60
|
+
api.addHTMLHeadScripts(() => {
|
|
61
|
+
var _a;
|
|
62
|
+
const dontModify = (_a = api.config.qiankun) === null || _a === void 0 ? void 0 : _a.shouldNotModifyRuntimePublicPath;
|
|
63
|
+
return dontModify
|
|
64
|
+
? []
|
|
65
|
+
: [
|
|
66
|
+
`window.publicPath = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${api.config.publicPath || '/'}";`,
|
|
67
|
+
];
|
|
68
|
+
});
|
|
71
69
|
api.chainWebpack((config) => {
|
|
72
70
|
(0, assert_1.default)(api.pkg.name, 'You should have name in package.json.');
|
|
73
71
|
const { shouldNotAddLibraryChunkName } = (api.config.qiankun || {}).slave;
|
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.20220412.3",
|
|
4
4
|
"description": "@umijs/plugins",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugins#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ahooksjs/use-request": "^2.0.0",
|
|
26
26
|
"@ant-design/icons": "^4.7.0",
|
|
27
|
-
"@ant-design/pro-layout": "^6.34.
|
|
28
|
-
"@umijs/bundler-utils": "4.0.0-canary.
|
|
27
|
+
"@ant-design/pro-layout": "^6.34.9",
|
|
28
|
+
"@umijs/bundler-utils": "4.0.0-canary.20220412.3",
|
|
29
29
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
30
30
|
"axios": "^0.26.1",
|
|
31
31
|
"babel-plugin-import": "^1.13.3",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"event-emitter": "~0.3.5",
|
|
37
37
|
"fast-deep-equal": "3.1.3",
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
|
-
"moment": "^2.29.
|
|
40
|
-
"qiankun": "^2.
|
|
39
|
+
"moment": "^2.29.2",
|
|
40
|
+
"qiankun": "^2.7.0",
|
|
41
41
|
"react-intl": "3.12.1",
|
|
42
|
-
"react-redux": "^7.2.
|
|
42
|
+
"react-redux": "^7.2.8",
|
|
43
43
|
"redux": "^4.1.2",
|
|
44
44
|
"warning": "^4.0.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"umi": "4.0.0-canary.
|
|
47
|
+
"umi": "4.0.0-canary.20220412.3"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|