koa2-webpack

1.1.0 • Public • Published

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

/koa2-webpack/

    Package Sidebar

    Install

    npm i koa2-webpack

    Weekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • cjg