A koa middleware works as development server for webpack. Well tested.
const webpackDevServer = ;
npm install koa-webpack-dev
- Can be integrated into your koa application as easy as using a serveStatic middleware. Just don't use it in production mode.
var koa = ;
var webpackDevServer = ;
var app = ;
- config: can be the content of webpack.config.js or a string specified the path of webpack.config.js
- watchOptions: options to be passed into the watch api of webpack. webpack#watching
- defaultPage: default entry page for url mapped to a directory. default: index.html
- webRoot: web root path. default: build path