diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 998f663c9..69690662e 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -44,7 +44,6 @@ "style-loader": "^0.23.0", "uglifyjs-webpack-plugin": "^2.0.1", "webpack": "^4.20.2", - "webpack-dashboard": "^2.0.0", "webpack-dev-middleware": "^3.4.0", "webpack-hot-middleware": "^2.24.0", "webpack-merge": "^4.1.4" diff --git a/packages/scripts/src/bin/index.ts b/packages/scripts/src/bin/index.ts index 0c61adaab..66b8accee 100644 --- a/packages/scripts/src/bin/index.ts +++ b/packages/scripts/src/bin/index.ts @@ -87,12 +87,6 @@ program signale.star('To spread the ❤️ please tweet.'); process.exit(0); }); - process.on('SIGKILL', () => { - server.stop(); - }); - process.on('SIGTERM', () => { - server.stop(); - }); } catch (e) { signale.error( 'Could not start development server. Please check the log below.' @@ -263,21 +257,3 @@ function getProjectAndServerConfig( return { projectConfig, serverConfig, projectConfigPath, serverConfigPath }; } - -// Error out on force close -process.on('SIGKILL', () => { - signale.fatal( - 'The operation failed because the process exited too early. ' + - 'This probably means the system ran out of memory or someone called ' + - '`kill -9` on the process.' - ); - process.exit(1); -}); -process.on('SIGTERM', () => { - signale.fatal( - 'The operation failed because the process exited too early. ' + - 'Someone might have called `kill` or `killall`, or the system could ' + - 'be shutting down.' - ); - process.exit(1); -}); diff --git a/packages/scripts/src/scripts/Server.ts b/packages/scripts/src/scripts/Server.ts index 1694ee81c..d1a9cfa84 100644 --- a/packages/scripts/src/scripts/Server.ts +++ b/packages/scripts/src/scripts/Server.ts @@ -1,6 +1,5 @@ import browserSync from 'browser-sync'; import webpack from 'webpack'; -import DashboardPlugin from 'webpack-dashboard/plugin'; import webpackDevMiddleware from 'webpack-dev-middleware'; import webpackHotMiddleware from 'webpack-hot-middleware'; @@ -48,8 +47,8 @@ export class Server { 'Can not serve while the server is already running.' ); } - // Init browserSync - const bs = browserSync.init(); + // Create browserSync Instance + const bs = browserSync.create(); // Create configuration const webpackConfig = new CreateWebpackConfig( this.projectConfig, @@ -89,7 +88,7 @@ export class Server { }); } else { const compiler = webpack(webpackConfig); - compiler.apply(new DashboardPlugin()); + // compiler.apply(new DashboardPlugin()); const devMiddleware = webpackDevMiddleware(compiler, { stats: { colors: true }, publicPath: