File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -197,22 +197,20 @@ function resolveLaravelPlugin(pluginConfig: Required<PluginConfig>): LaravelPlug
197197 }
198198 } )
199199
200- if ( exitHandlersBound ) {
201- return
202- }
203-
204- const clean = ( ) => {
205- if ( fs . existsSync ( pluginConfig . hotFile ) ) {
206- fs . rmSync ( pluginConfig . hotFile )
200+ if ( ! exitHandlersBound ) {
201+ const clean = ( ) => {
202+ if ( fs . existsSync ( pluginConfig . hotFile ) ) {
203+ fs . rmSync ( pluginConfig . hotFile )
204+ }
207205 }
208- }
209206
210- process . on ( 'exit' , clean )
211- process . on ( 'SIGINT' , process . exit )
212- process . on ( 'SIGTERM' , process . exit )
213- process . on ( 'SIGHUP' , process . exit )
207+ process . on ( 'exit' , clean )
208+ process . on ( 'SIGINT' , process . exit )
209+ process . on ( 'SIGTERM' , process . exit )
210+ process . on ( 'SIGHUP' , process . exit )
214211
215- exitHandlersBound = true
212+ exitHandlersBound = true
213+ }
216214
217215 return ( ) => server . middlewares . use ( ( req , res , next ) => {
218216 if ( req . url === '/index.html' ) {
You can’t perform that action at this time.
0 commit comments