swico 0.9.0-beta7 → 0.9.0-beta9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "0.9.0-beta7",
3
+ "version": "0.9.0-beta9",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -132,7 +132,7 @@ var getRouter = function (routerType) {
132
132
  var routeList = [
133
133
  {
134
134
  element: react_1.default.createElement(layout_1.default, null),
135
- path: '',
135
+ path: '/',
136
136
  children: (0, index_1.getChildrenRouteList)(routes_1.default, '')
137
137
  }
138
138
  ];
@@ -41,7 +41,7 @@ var getChildrenRouteList = function (childrenRoutes, ancPathKey) {
41
41
  return {
42
42
  element: redirect ? (react_1.default.createElement(react_router_dom_1.Navigate, { to: redirect, replace: true })) : component ? (react_1.default.createElement(react_1.Suspense, { fallback: (0, react_1.createElement)(loading_1.default) }, (0, react_1.createElement)((0, react_1.lazy)(component)))) : (react_1.default.createElement(react_router_dom_1.Outlet, null)),
43
43
  key: newAncPathKey,
44
- path: path,
44
+ path: path.startsWith('/') ? path.slice(1) : path,
45
45
  children: (0, exports.getChildrenRouteList)(children, newAncPathKey)
46
46
  };
47
47
  });