Skip to content

Commit

Permalink
feat: remove webpack dashboard because it doesn't work
Browse files Browse the repository at this point in the history
I don't know why! πŸ˜•
  • Loading branch information
swashata committed Oct 7, 2018
1 parent bc38690 commit 3fc2423
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 29 deletions.
1 change: 0 additions & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 0 additions & 24 deletions packages/scripts/src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down Expand Up @@ -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);
});
7 changes: 3 additions & 4 deletions packages/scripts/src/scripts/Server.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 3fc2423

Please sign in to comment.