@ray-js/build-plugin-router 1.2.21 → 1.2.22

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.
Files changed (2) hide show
  1. package/lib/index.js +3 -1
  2. package/package.json +4 -4
package/lib/index.js CHANGED
@@ -270,7 +270,9 @@ function PluginRouter(api) {
270
270
  * @param data
271
271
  */
272
272
  generateAppConfig(target, data) {
273
- data.themeLocation = data.themeLocation.replace(/(?:\.{1,2}\/)*/, '');
273
+ if (themeLocation) {
274
+ data.themeLocation = themeLocation.replace(/(?:\.{1,2}\/)*/, '');
275
+ }
274
276
  const templateFile = path_1.default.join(__dirname, '../templates/app.config.ejs');
275
277
  const context = ejsRender(templateFile, { appConfig: { [target]: data } });
276
278
  api.writeFile('src/app.config.ts', context);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/build-plugin-router",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
4
4
  "description": "Ray build plugin for router",
5
5
  "keywords": [
6
6
  "ray"
@@ -21,7 +21,7 @@
21
21
  "watch": "tsc -p ./tsconfig.build.json --watch"
22
22
  },
23
23
  "dependencies": {
24
- "@ray-js/shared": "^1.2.21",
24
+ "@ray-js/shared": "^1.2.22",
25
25
  "chokidar": "^3.5.2",
26
26
  "colors": "1.4.0",
27
27
  "ejs": "^3.1.6",
@@ -30,7 +30,7 @@
30
30
  "url": "^0.11.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@ray-js/types": "^1.2.21"
33
+ "@ray-js/types": "^1.2.22"
34
34
  },
35
35
  "maintainers": [
36
36
  {
@@ -38,6 +38,6 @@
38
38
  "email": "tuyafe@tuya.com"
39
39
  }
40
40
  ],
41
- "gitHead": "8066938e1d62dd0d2b217c94c4e4f61cced54f37",
41
+ "gitHead": "a0fd2d86aaa677aa0b93188cbccda069dfee8de8",
42
42
  "repository": {}
43
43
  }