Skip to content

Instantly share code, notes, and snippets.

@xuyuji9000
Created February 10, 2017 04:45
Show Gist options
  • Save xuyuji9000/d1b8781fa6a50398eb9a6cf48bd19cbf to your computer and use it in GitHub Desktop.
Save xuyuji9000/d1b8781fa6a50398eb9a6cf48bd19cbf to your computer and use it in GitHub Desktop.
var WebpackDevServer = require("webpack-dev-server");
var webpack = require("webpack");
var config = require("./webpack.config.js");
var server = new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
noInfo: false,
historyApiFallback: true,
stats: {colors: true}
});
server.listen(8080, "localhost", function(err) {
if(err) {
console.log(err);
}
console.log("Listening at http://localhost:8080...");
});
@xuyuji9000
Copy link
Author

This is a react hot load server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment