@autobest-ui/scripts 1.5.7 → 1.5.8-alpha.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/common/start.js +14 -9
- package/package.json +2 -2
package/common/start.js
CHANGED
|
@@ -15,6 +15,9 @@ function openStartRun(webpackFactory) {
|
|
|
15
15
|
const extendEnv = getEnvironmentInfo();
|
|
16
16
|
|
|
17
17
|
const options = {
|
|
18
|
+
headers: {
|
|
19
|
+
'Access-Control-Allow-Origin': '*'
|
|
20
|
+
},
|
|
18
21
|
allowedHosts: 'all',
|
|
19
22
|
hot: true,
|
|
20
23
|
host: HOST,
|
|
@@ -57,15 +60,17 @@ function openStartRun(webpackFactory) {
|
|
|
57
60
|
}
|
|
58
61
|
});
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
hasOpenBrowser
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
if (startOpenPath) {
|
|
64
|
+
// 添加钩子函数,弹出浏览器
|
|
65
|
+
compiler.hooks.done.tap('OpenBrowser', () => {
|
|
66
|
+
if (!hasOpenBrowser) {
|
|
67
|
+
hasOpenBrowser = true;
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
open(`http://localhost:${PORT}${startOpenPath}`);
|
|
70
|
+
}, 600);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
69
74
|
|
|
70
75
|
server.startCallback(err => {
|
|
71
76
|
if (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobest-ui/scripts",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.8-alpha.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "utils for project tools",
|
|
6
6
|
"bin": {
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"webpack-merge": "5.8.0",
|
|
93
93
|
"webpack-node-externals": "3.0.0"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "1b1ba4a8f8af498939924fd6b6d09f84e41cbaf6"
|
|
96
96
|
}
|