Created
June 28, 2016 12:36
-
-
Save chuck0523/c2884064ef9b27517cd53d8af29b190e to your computer and use it in GitHub Desktop.
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
const WebpackDevServer = require("webpack-dev-server") | |
const webpack = require('webpack') | |
const config = require('./webpack.config.js') | |
config.entry.client.push("webpack-dev-server/client?http://localhost:8080") | |
config.entry.client.push("webpack/hot/dev-server") | |
config.plugins.push(new webpack.HotModuleReplacementPlugin()) | |
const compiler = webpack(config) | |
const server = new WebpackDevServer(compiler, { | |
publicPath: config.output.publicPath, | |
hot: true | |
}) | |
server.listen(8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment