Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function startDevServer(webpackOptions, options) {
addDevServerEntrypoints(webpackOptions, options);
let compiler;
try {
compiler = webpack(webpackOptions);
} catch (e) {
if (e instanceof webpack.WebpackOptionsValidationError) {
console.error(colorError(options.stats.colors, e.message));
process.exit(1); // eslint-disable-line
}
throw e;
}
const suffix = options.inline !== false || options.lazy === true ? '/' : '/webpack-dev-server/';
let server;
try {
server = new WebpackDevServer(compiler, options);