1.1.0 • Published 7 years ago

koa2-webpack v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

koa2 middleware for webpack (HMR)

Install

$ npm install --save koa@next
$ npm install --save koa2-webpack

Usage

const Koa = require('koa')
const app = new Koa()
const webpackHRM = require('koa2-webpack')

app.use(webpackHRM({
  config: require('/* ... webpack.config.js */'),
  dev:{
    /* Config Options */
  },
  hot:{
    /* Config Options */
  }
}))

Examples

$ git clone https://github.com/cjg125/koa2-webpack.git demo
$ cd demo
$ npm install
$ npm start # node --harmony example/
# http://127.0.0.1:8888/

Config Options

webpack-dev-middleware webpack-hot-middleware