Skip to content

Instantly share code, notes, and snippets.

@faceyspacey
Last active August 10, 2017 06:30
Show Gist options
  • Save faceyspacey/a1f0ac55ff7d78388fb1dd4880675880 to your computer and use it in GitHub Desktop.
Save faceyspacey/a1f0ac55ff7d78388fb1dd4880675880 to your computer and use it in GitHub Desktop.
const app = express()
const multiCompiler = webpack([clientConfig, serverConfig])
const clientCompiler = multiCompiler.compilers[0]
app.use(webpackDevMiddleware(multiCompiler, { publicPath }))
app.use(webpackHotMiddleware(clientCompiler))
app.use(webpackHotServerMiddleware(multiCompiler)
app.listen(3000, () => console.log('READY'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment