@ray-js/build-plugin-router 1.5.0-beta.11 → 1.5.0
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/lib/index.js +2 -2
- package/package.json +6 -6
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.5.0
|
3
|
+
"version": "1.5.0",
|
4
4
|
"description": "Ray build plugin for router",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -24,20 +24,20 @@
|
|
24
24
|
"watch": "tsc -p ./tsconfig.build.json --watch"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@ray-js/shared": "
|
28
|
-
"chokidar": "^3.
|
27
|
+
"@ray-js/shared": "1.5.0",
|
28
|
+
"chokidar": "^3.6.0",
|
29
29
|
"colors": "1.4.0",
|
30
30
|
"ejs": "^3.1.9",
|
31
31
|
"fs-extra": "^10.1.0",
|
32
32
|
"path-to-regexp": "^6.2.1",
|
33
|
-
"url": "^0.11.
|
33
|
+
"url": "^0.11.3"
|
34
34
|
},
|
35
35
|
"devDependencies": {
|
36
|
-
"@ray-js/types": "
|
36
|
+
"@ray-js/types": "1.5.0"
|
37
37
|
},
|
38
38
|
"publishConfig": {
|
39
39
|
"access": "public",
|
40
40
|
"registry": "https://registry.npmjs.org"
|
41
41
|
},
|
42
|
-
"gitHead": "
|
42
|
+
"gitHead": "acb0b960e4f0cda492b34c950bf9cd8d5b27ec8a"
|
43
43
|
}
|