Skip to content

Instantly share code, notes, and snippets.

@notgiorgi
Last active January 15, 2017 16:16
Show Gist options
  • Save notgiorgi/3e5e8f56719b84780d1864ab5b992874 to your computer and use it in GitHub Desktop.
Save notgiorgi/3e5e8f56719b84780d1864ab5b992874 to your computer and use it in GitHub Desktop.
const webpack = require('webpack')
const WebpackDevServer = require('webpack-dev-server')
// your wp config lives here
const config = require('./webpack.config')
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
}).listen(1337, 'localhost', (err, result) => {
if (err) {
return console.log(err)
}
console.log('Listening at http://localhost:1337/')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment