koa-hot-dev-webpack
Why?
Because there are not enough webpack middleware for koa out there
What?
webpack-dev-middleware and webpack-hot-middleware with good defaults for fast setup of koa dev servers.
How?
Install
npm install --save koa-hot-dev-webpack webpack
Usage
koaHotDevWebpack = koa// webpackConfig is mandatory
It will add the following plugins:
// for Webpack 1// for Webpack 2
and inject webpack-hot-middleware/client
to all entry points
middlewareOptions defaults are
publicPath: webpackConfigoutputpublicPath || "/" noInfo: true stats: colors:true
API
All only work for the last instance created!
koaHotDevWebpack // to invalidate the bundlekoaHotDevWebpack // to reload client sidekoaHotDevWebpack // to close webpack
License
Copyright (c) 2016 Paul Pflugradt Licensed under the MIT license.