Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const compiler = webpack(bundle, (err, stats) => {
if (stats.hasErrors()) {
buildLogging.error(`There was a build error for ${bundle.name}`);
process.exit(1);
} else {
const port = options.port + 1 + index;
viewer.startServer(stats.toJson(), {
openBrowser: false,
port,
});
}
});
compiler.hooks.compile.tap('Process', startCallback);