{"name":"koa-webpack-dev-middleware","version":"1.4.6","description":"webpack dev middleware for koa","keywords":["koa","webpack","middleware"],"main":"lib/index","files":["lib"],"homepage":"http://github.com/yiminghe/koa-webpack-dev-middleware","author":{"name":"yiminghe@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/yiminghe/koa-webpack-dev-middleware.git"},"bugs":{"url":"http://github.com/yiminghe/koa-webpack-dev-middleware/issues"},"engines":{"node":">=6.0.0"},"scripts":{"compile":"babel src --out-dir lib","pub":"npm run compile && npm publish && git push origin"},"babel":{"presets":["es2015-native-generators"]},"licenses":"MIT","dependencies":{"webpack-dev-middleware":"^1.10.0"},"devDependencies":{"babel-cli":"^6.0.0","babel-preset-es2015-native-generators":"^6.6.0"},"gitHead":"0a49ba0b080cbabbce5fb0cfbc597009edab3458","_id":"koa-webpack-dev-middleware@1.4.6","_shasum":"6ec20d3648c3c80b5edb0b721a6838f66a1fc47a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"yiminghe","email":"yiminghe@gmail.com"},"dist":{"shasum":"6ec20d3648c3c80b5edb0b721a6838f66a1fc47a","tarball":"http://registry-npm.ywwl.com/koa-webpack-dev-middleware/download/koa-webpack-dev-middleware-1.4.6.tgz","integrity":"sha512-KakVmc7kBR6gvHCbvxMibcEtm503tT53jKjAu0lLucvfv+ghDEVTCYahR339yJPIPJp+e2ZGUG1kY5J0VVJZHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJX54FMcbuvoMsKWNhbRMJI6CnzyV91bzNiqLfMTLqGAiAy7DkMwxxMCiAd3MkOqpUAlQVAE8vIHKdTMMNJM5D/CQ=="}],"size":1662,"noattachment":false,"key":"/koa-webpack-dev-middleware/-/koa-webpack-dev-middleware-1.4.6.tgz"},"maintainers":[{"name":"yiminghe","email":"yiminghe@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/koa-webpack-dev-middleware-1.4.6.tgz_1495111174677_0.985313915181905"},"directories":{},"readme":"# koa-webpack-dev-middleware\n\nwebpack dev middleware for koa 2.x\n\n[![node version][node-image]][node-url]\n\n[node-image]: https://img.shields.io/badge/node.js-%3E=_7.6.0-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n\n## Usage\n\nsame with https://github.com/webpack/webpack-dev-middleware. will add original middleware to ctx.webpack\n\n\n```js\nvar app = require('koa')();\nvar webpackMiddleware = require(\"koa-webpack-dev-middleware\");\napp.use(webpackMiddleware(...));\n\n```\n\n### Example usage\n\n```js\nvar app = require('koa')();\napp.use(webpackMiddleware(webpack({\n    // webpack options\n    // webpackMiddleware takes a Compiler object as first parameter\n    // which is returned by webpack(...) without callback.\n    entry: \"...\",\n    output: {\n        path: \"/\"\n        // no real path is required, just pass \"/\"\n        // but it will work with other paths too.\n    }\n}), {\n    // all options optional\n\n    noInfo: false,\n    // display no info to console (only warnings and errors)\n\n    quiet: false,\n    // display nothing to the console\n\n    lazy: true,\n    // switch into lazy mode\n    // that means no watching, but recompilation on every request\n\n    watchDelay: 300,\n    // delay after change (only lazy: false)\n\n    publicPath: \"/assets/\",\n    // public path to bind the middleware to\n    // use the same as in webpack\n\n    headers: { \"X-Custom-Header\": \"yes\" },\n    // custom headers\n\n    stats: {\n        colors: true\n    }\n    // options for formating the statistics\n}));\n```","publish_time":1495111174909,"_cnpm_publish_time":1495111174909,"dist-tags":{"latest":"2.0.2"}}