packages/cli: tweak bundle dev server setup

This commit is contained in:
Patrik Oldsberg
2020-05-16 17:36:23 +02:00
parent c744f5e4a3
commit 989b13ca75
+9 -1
View File
@@ -41,7 +41,8 @@ export async function startDevServer() {
hot: true,
publicPath: '/',
historyApiFallback: true,
quiet: true,
clientLogLevel: 'warning',
stats: 'errors-warnings',
https: protocol === 'https',
host,
port,
@@ -54,6 +55,13 @@ export async function startDevServer() {
return;
}
for (const signal of ['SIGINT', 'SIGTERM'] as const) {
process.on(signal, () => {
server.close();
process.exit();
});
}
openBrowser(urls.localUrlForBrowser);
resolve();
});