How to use the webpack-dev-server/lib/utils/addEntries function in webpack-dev-server

To help you get started, we’ve selected a few webpack-dev-server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aquariuslt / vue-boilerplate / tasks / serve.js View on Github external
gulp.task('serve', function() {
  log.info('Webpack building.');
  addEntries(webpackDevConfig, webpackDevConfig.devServer);
  let compilerConfig = webpack(webpackDevConfig);
  new WebpackDevServer(compilerConfig, webpackDevConfig.devServer).listen(webpackDevConfig.devServer.port, webpackDevConfig.devServer.host, function(error) {
    if (error) {
      log.error('Webpack build error:', error);
    }
    log.info('Open:', AUTO_OPEN_URL);
    opn(AUTO_OPEN_URL);
  });
});