swico 0.9.0-beta7 → 0.9.0-beta8

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-beta8",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -9,9 +9,7 @@ var qs_1 = __importDefault(require("qs"));
9
9
  var history_1 = require("history");
10
10
  var routes_1 = __importDefault(require("./routes"));
11
11
  var config_1 = require("./config");
12
- var layout_1 = __importDefault(require("../../layout"));
13
12
  var react_router_dom_1 = require("react-router-dom");
14
- var react_1 = __importDefault(require("react"));
15
13
  var lastIndexBase = config_1.routerBase[config_1.routerBase.length - 1];
16
14
  var formatRouterBase = lastIndexBase === '/' ? config_1.routerBase.slice(0, config_1.routerBase.length - 1) : config_1.routerBase;
17
15
  var compareURLPatterns = function (urlPatternWithValues, urlPatternWithParams) {
@@ -129,13 +127,7 @@ var getFormatHistoryOption = function (to, pathList, type) {
129
127
  };
130
128
  var getRouter = function (routerType) {
131
129
  var _a;
132
- var routeList = [
133
- {
134
- element: react_1.default.createElement(layout_1.default, null),
135
- path: '',
136
- children: (0, index_1.getChildrenRouteList)(routes_1.default, '')
137
- }
138
- ];
130
+ var routeList = (0, index_1.getChildrenRouteList)(routes_1.default, '');
139
131
  var router = (routerType === 'hash' ? react_router_dom_1.createHashRouter : react_router_dom_1.createBrowserRouter)(routeList);
140
132
  var oriHistory = (_a = (routerType === 'hash' ? history_1.createHashHistory : history_1.createBrowserHistory)) === null || _a === void 0 ? void 0 : _a();
141
133
  exports.history = {