Skip to content

Commit d4f6e2c

Browse files
committed
Display errors on exit
1 parent 3e4dbd2 commit d4f6e2c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/index.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,21 @@ export default function laravel(config: string|string[]|PluginConfig): LaravelPl
134134
if (fs.existsSync(hotFile)) {
135135
fs.rmSync(hotFile)
136136
}
137-
process.exit()
138137
}
139138

140139
process.on('exit', clean)
141-
process.on('SIGHUP', clean)
142-
process.on('SIGINT', clean)
143-
process.on('SIGTERM', clean)
140+
process.on('SIGHUP', () => {
141+
clean()
142+
process.exit()
143+
})
144+
process.on('SIGINT', () => {
145+
clean()
146+
process.exit()
147+
})
148+
process.on('SIGTERM', () => {
149+
clean()
150+
process.exit()
151+
})
144152
},
145153

146154
// The following two hooks are a workaround to help solve a "flash of unstyled content" with Blade.

0 commit comments

Comments
 (0)