UNPKG

koa2-hmr-middleware

Version:

HRM middleware ( webpack-dev-middleware, webpack-hot-middleware) for koa2

18 lines (13 loc) 366 B
'use strict'; const dev = require('./lib/dev'); const hot = require('./lib/hot'); const compose = require('koa-compose'); function hmrMiddleware(compiler, config){ return compose([ dev(compiler, config.dev), hot(compiler, config.hot) ]) } hmrMiddleware.dev = dev; hmrMiddleware.hot = hot; module.exports = hmrMiddleware;