packages/cli: tweak bundle dev server setup
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user