@ray-js/build-plugin-router 1.4.43 → 1.4.45
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.js +2 -2
- package/package.json +5 -5
package/lib/index.js
CHANGED
@@ -234,7 +234,7 @@ function PluginRouter(api) {
|
|
234
234
|
getStandardAppConfigData(routesConfig, globalConfig) {
|
235
235
|
var _a, _b, _c, _d;
|
236
236
|
const { target } = api.options;
|
237
|
-
const
|
237
|
+
const globalConfigData = target === 'thing'
|
238
238
|
? (_b = (_a = globalConfig['thing']) !== null && _a !== void 0 ? _a : globalConfig['tuya']) !== null && _b !== void 0 ? _b : {} // 因历史原因,需要兼容老项目的老配置,老项目中都是 tuya
|
239
239
|
: (_c = globalConfig[target]) !== null && _c !== void 0 ? _c : {};
|
240
240
|
const { routes = [], subpackages, subPackages, tabBar: _tabBar } = routesConfig, otherConfig = __rest(routesConfig, ["routes", "subpackages", "subPackages", "tabBar"]);
|
@@ -247,7 +247,7 @@ function PluginRouter(api) {
|
|
247
247
|
const pages = lodash_1.default.uniq(_routes.map((r) => r.path.replace(/^\//, '')));
|
248
248
|
const tabBar = normalizeTabBarConfig(_tabBar, _routes, standardAppConfigFieldMap);
|
249
249
|
const { workers = [], root: workerRoot } = otherConfig.workers || {};
|
250
|
-
const config = Object.assign(Object.assign(Object.assign({},
|
250
|
+
const config = Object.assign(Object.assign(Object.assign({}, globalConfigData), otherConfig), { pages, tabBar });
|
251
251
|
if (workerRoot) {
|
252
252
|
config.workers =
|
253
253
|
target !== 'thing'
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/build-plugin-router",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.45",
|
4
4
|
"description": "Ray build plugin for router",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"watch": "tsc -p ./tsconfig.build.json --watch"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@ray-js/shared": "1.4.
|
28
|
-
"chokidar": "^3.
|
27
|
+
"@ray-js/shared": "1.4.45",
|
28
|
+
"chokidar": "^3.6.0",
|
29
29
|
"colors": "1.4.0",
|
30
30
|
"ejs": "^3.1.9",
|
31
31
|
"fs-extra": "^10.1.0",
|
@@ -33,11 +33,11 @@
|
|
33
33
|
"url": "^0.11.3"
|
34
34
|
},
|
35
35
|
"devDependencies": {
|
36
|
-
"@ray-js/types": "1.4.
|
36
|
+
"@ray-js/types": "1.4.45"
|
37
37
|
},
|
38
38
|
"publishConfig": {
|
39
39
|
"access": "public",
|
40
40
|
"registry": "https://registry.npmjs.org"
|
41
41
|
},
|
42
|
-
"gitHead": "
|
42
|
+
"gitHead": "3d43182ecec581aec70f654706be0b070e38011b"
|
43
43
|
}
|