yiminghe / koa-webpack-dev-middleware

webpack dev middleware for koa
93 stars 29 forks source link

Webpack middleware access through context #9

Closed yevhene closed 8 years ago

yevhene commented 8 years ago

Example:

const middleware = webpackMiddleware(compiler, { ... });
app.use(middleware);
app.get(function *() {
  this.body = this.webpack.fileSystem.readFileSync('index.html');
});

closes #7