Created
July 10, 2015 20:47
-
-
Save oscarduignan/c4e8fc7738c69a21f32a to your computer and use it in GitHub Desktop.
webpack dev server config to go ina gulp file... issue is that I forgot that this does live reload for everything but the html which I'm compiling separately so that's why I need browser-sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WEBPACK_PORT = process.env.WEBPACK_PORT || 8080; | |
new WebpackDevServer(webpack, { | |
hot: true, | |
inline: true, | |
contentBase: path.resolve(__dirname, 'dist'), | |
progress: true, | |
stats: { | |
colors: require('supports-color'), | |
chunks: false | |
} | |
}).listen(WEBPACK_PORT, function(err) { | |
if(err) throw new gutil.PluginError("webpack-dev-server", err); | |
// http://stackoverflow.com/questions/3653065/get-local-ip-address-in-node-js | |
require('dns').lookup(require('os').hostname(), function (err, add, fam) { | |
gutil.log("[webpack-dev-server]", "http://" + add + ":" + WEBPACK_PORT); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment