File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ launch({
44
44
// instead of restarting the process.
45
45
' src/server/ssr/serverSideRender.js' ,
46
46
],
47
+ restartOnError: true , // optional, restart when child process has an uncaught error/promise rejection (default: true)
48
+ restartOnExit: true , // optional, restart when child process exits (default: true)
47
49
})
48
50
```
49
51
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ module.exports = function launch(ops) {
27
27
includeModules : false ,
28
28
ignore : / ( \/ \. | ~ $ ) / ,
29
29
restartOnError : true ,
30
+ restartOnExit : true ,
30
31
killSignal : 'SIGINT' ,
31
32
command : process . argv [ 0 ] ,
32
33
commandOptions : [ ] ,
@@ -58,7 +59,7 @@ module.exports = function launch(ops) {
58
59
}
59
60
60
61
childRunning = false
61
- restart ( )
62
+ if ( options . restartOnExit ) restart ( )
62
63
}
63
64
64
65
function restart ( ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " smart-restart" ,
3
- "version" : " 2.1 .0" ,
3
+ "version" : " 2.2 .0" ,
4
4
"description" : " Like nodemon but only watches require()d files. Like piping but easy to use with node-inspector." ,
5
5
"engines" : {
6
6
"node" : " >=8"
You can’t perform that action at this time.
0 commit comments