Skip to content

Instantly share code, notes, and snippets.

@munro
Created September 19, 2015 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save munro/a59614b344106dc42b35 to your computer and use it in GitHub Desktop.
Save munro/a59614b344106dc42b35 to your computer and use it in GitHub Desktop.
webpack_config.entry.unshift(
'webpack-dev-server/client?' + argv.root_url,
'webpack/hot/dev-server'
);
webpack_config.plugins.unshift(
new webpack.HotModuleReplacementPlugin()
);
webpack_config.devtool = '#source-map';
webpack_config.pathInfo = true;
return Promise.promisifyAll(new WebpackDevServer(webpack(webpack_config), {
contentBase: argv.static_compiled,
inline: true,
hot: true,
stats: {colors: true}
})).listenAsync(argv.port, argv.host).then(function () {
gutil.log('[webpack-dev-server]', 'Listening on: ' + argv.root_url);
}, function (err) {
throw new gutil.PluginError('webpack-dev-server', err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment