kn-cli 1.0.57 → 1.0.58
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/build/cli.config.js +5 -0
- package/build/webpack.config.js +4 -3
- package/package.json +1 -1
- package/readme.md +8 -0
- package/src/build.js +1 -0
package/build/cli.config.js
CHANGED
|
@@ -38,4 +38,9 @@ module.exports = {
|
|
|
38
38
|
// output:'../index.html',//将index.html输出到 dist目录外的index.html
|
|
39
39
|
// },
|
|
40
40
|
// projectSourceFolder:'./',//项目源代码文件夹所在位置,默认是'src'
|
|
41
|
+
// devServer:{
|
|
42
|
+
// host:'0.0.0.0',//指定调试地址IP
|
|
43
|
+
// port:8080,
|
|
44
|
+
// useLocalIp:false,//是否使用本地IP地址代替localhost
|
|
45
|
+
// }
|
|
41
46
|
};
|
package/build/webpack.config.js
CHANGED
|
@@ -41,6 +41,7 @@ const jsSplitMode = CLI_CONFIG?.jsSplitMode??true;
|
|
|
41
41
|
const indexHtml = CLI_CONFIG?.indexHtml ?? true;
|
|
42
42
|
const https= CLI_CONFIG?.https ?? false;
|
|
43
43
|
const appVersion= CLI_CONFIG?.version ?? '';
|
|
44
|
+
const devServer=CLI_CONFIG?.devServer??{};
|
|
44
45
|
|
|
45
46
|
let distFolder = 'dist';
|
|
46
47
|
let distJsFolder='';
|
|
@@ -460,7 +461,7 @@ module.exports = {
|
|
|
460
461
|
devServer: {
|
|
461
462
|
disableHostCheck: true,
|
|
462
463
|
contentBase: distFolder,
|
|
463
|
-
host: '
|
|
464
|
+
host: devServer?.host??'localhost',
|
|
464
465
|
open: true,
|
|
465
466
|
overlay:true,
|
|
466
467
|
stats:{
|
|
@@ -470,8 +471,8 @@ module.exports = {
|
|
|
470
471
|
errorDetails:true,
|
|
471
472
|
warnings:true
|
|
472
473
|
},
|
|
473
|
-
|
|
474
|
-
|
|
474
|
+
port: devServer?.port??8080,
|
|
475
|
+
useLocalIp:devServer?.useLocalIp??false,
|
|
475
476
|
https:https,//true,//注意开了https就不能使用本地ip访问,只能使用0.0.0.0
|
|
476
477
|
proxy: API_CONFIG.API_PROXY
|
|
477
478
|
// hot: true,
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -65,10 +65,18 @@ module.exports = {
|
|
|
65
65
|
// rules:{
|
|
66
66
|
// compileNpmPackage:['kn-hooks'],//需要参与编译的npm包
|
|
67
67
|
// },
|
|
68
|
+
// devServer:{
|
|
69
|
+
// host:'0.0.0.0',//指定调试地址IP
|
|
70
|
+
// port:8080,
|
|
71
|
+
// useLocalIp:false,//是否使用本地IP地址代替localhost
|
|
72
|
+
// }
|
|
68
73
|
};
|
|
69
74
|
```
|
|
70
75
|
|
|
71
76
|
# 更新日志
|
|
77
|
+
* 1.0.57
|
|
78
|
+
增加cli.config.js内devServer配置
|
|
79
|
+
|
|
72
80
|
* 1.0.56
|
|
73
81
|
OA模板更新
|
|
74
82
|
|