wildpig 1.3.4 → 1.3.5
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/package.json +1 -1
- package/scripts/server.ts +4 -1
package/package.json
CHANGED
package/scripts/server.ts
CHANGED
|
@@ -20,7 +20,10 @@ const startHotServer = () => {
|
|
|
20
20
|
watch("src", {recursive: true}, async () => {
|
|
21
21
|
console.log(chalk.green("检测到src下文件路径变化(新增、删除或移动文件),重启服务..."));
|
|
22
22
|
await server.stop();
|
|
23
|
-
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
server = startServer();
|
|
25
|
+
console.log(chalk.green("服务已重启"));
|
|
26
|
+
}, 500);
|
|
24
27
|
})
|
|
25
28
|
}
|
|
26
29
|
startHotServer();
|