@jiangood/admin-spring-boot-starter 0.2.0 → 0.2.2
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/config/dist/config.js
CHANGED
|
@@ -11,6 +11,7 @@ var isFramework = fs.existsSync(path.join(process.cwd(), 'config/plugins/route-p
|
|
|
11
11
|
console.log('isFramework', isFramework);
|
|
12
12
|
var pluginDir = isFramework ? './config/plugins' : '@jiangood/admin-spring-boot-starter/config/dist/plugins';
|
|
13
13
|
console.log('pluginDir', pluginDir);
|
|
14
|
+
var host = '127.0.0.1:8080';
|
|
14
15
|
exports.default = (0, umi_1.defineConfig)({
|
|
15
16
|
// 配置是否让生成的文件包含 hash 后缀,通常用于增量发布和避免浏览器加载缓存。
|
|
16
17
|
hash: true,
|
|
@@ -24,20 +25,20 @@ exports.default = (0, umi_1.defineConfig)({
|
|
|
24
25
|
],
|
|
25
26
|
proxy: {
|
|
26
27
|
'/admin': {
|
|
27
|
-
target: 'http://
|
|
28
|
+
target: 'http://' + host,
|
|
28
29
|
changeOrigin: true,
|
|
29
30
|
},
|
|
30
31
|
'/preview': {
|
|
31
|
-
target: 'http://
|
|
32
|
+
target: 'http://' + host,
|
|
32
33
|
changeOrigin: true,
|
|
33
34
|
},
|
|
34
35
|
'/ureport': {
|
|
35
|
-
target: 'http://
|
|
36
|
+
target: 'http://' + host,
|
|
36
37
|
changeOrigin: true,
|
|
37
38
|
pathRewrite: { '^/ureport': '/ureport' },
|
|
38
39
|
},
|
|
39
40
|
'/admin/ws': {
|
|
40
|
-
target: '
|
|
41
|
+
target: 'ws://' + host,
|
|
41
42
|
changeOrigin: true,
|
|
42
43
|
ws: true,
|
|
43
44
|
},
|
|
@@ -17,7 +17,7 @@ exports.default = (function (api) {
|
|
|
17
17
|
}
|
|
18
18
|
var frameworkRoutes = [];
|
|
19
19
|
parseDir(pageDir, frameworkRoutes);
|
|
20
|
-
api.logger.info('
|
|
20
|
+
api.logger.info('框架路由数量: ', frameworkRoutes.length);
|
|
21
21
|
api.modifyRoutes(function (routes) {
|
|
22
22
|
// routes 代表用户项目的路由,umi已经自动解析过pages目录
|
|
23
23
|
// 接下来加入加入框架的路由,确保用户项目路由优先级高
|