@umijs/plugins 4.0.0-canary.20220506.3 → 4.0.0-canary.20220506.4

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.
@@ -105,8 +105,8 @@ const recursiveSearch = (
105
105
  if (routes[i].path === path) {
106
106
  return routes[i];
107
107
  }
108
- if (routes[i].chidlren && routes[i].chidlren?.length) {
109
- const found = recursiveSearch(routes[i].chidlren || [], path);
108
+ if (routes[i].children && routes[i].children?.length) {
109
+ const found = recursiveSearch(routes[i].children || [], path);
110
110
  if (found) {
111
111
  return found;
112
112
  }
@@ -128,8 +128,8 @@ export function insertRoute(routes: IRouteProps[], microAppRoute: IRouteProps) {
128
128
  );
129
129
  }
130
130
  found.exact = false;
131
- found.chidlren = found.chidlren || [];
132
- found.chidlren.push(microAppRoute);
131
+ found.children = found.children || [];
132
+ found.children.push(microAppRoute);
133
133
  } else {
134
134
  throw new Error(
135
135
  `[plugin-qiankun]: path "${microAppRoute.insert}" not found`,
@@ -34,10 +34,10 @@ function patchMicroAppRouteComponent(routes: any[]) {
34
34
  const rootRoute = routes.find((route) => route.path === '/');
35
35
  if (rootRoute) {
36
36
  // 如果根路由是叶子节点,则直接返回其父节点
37
- if (!rootRoute.chidlren) {
37
+ if (!rootRoute.children) {
38
38
  return routes;
39
39
  }
40
- return getRootRoutes(rootRoute.chidlren);
40
+ return getRootRoutes(rootRoute.children);
41
41
  }
42
42
  return routes;
43
43
  };
@@ -54,8 +54,8 @@ function patchMicroAppRouteComponent(routes: any[]) {
54
54
  masterHistoryType,
55
55
  routeBindingAlias,
56
56
  });
57
- if (route.chidlren?.length) {
58
- route.chidlren.forEach(patchRoute);
57
+ if (route.children?.length) {
58
+ route.children.forEach(patchRoute);
59
59
  }
60
60
  };
61
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.0.0-canary.20220506.3",
3
+ "version": "4.0.0-canary.20220506.4",
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",
@@ -25,7 +25,7 @@
25
25
  "@ahooksjs/use-request": "^2.0.0",
26
26
  "@ant-design/icons": "^4.7.0",
27
27
  "@ant-design/pro-layout": "^6.35.1",
28
- "@umijs/bundler-utils": "4.0.0-canary.20220506.3",
28
+ "@umijs/bundler-utils": "4.0.0-canary.20220506.4",
29
29
  "antd-dayjs-webpack-plugin": "^1.0.6",
30
30
  "axios": "^0.26.1",
31
31
  "babel-plugin-import": "^1.13.3",
@@ -44,7 +44,7 @@
44
44
  "warning": "^4.0.3"
45
45
  },
46
46
  "devDependencies": {
47
- "umi": "4.0.0-canary.20220506.3"
47
+ "umi": "4.0.0-canary.20220506.4"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"