{"_id":"koa-webpack-hot-middleware","_rev":"1213463","name":"koa-webpack-hot-middleware","description":"webpack hot reload middleware for koa","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"day-alone","email":"andrey.slider@gmail.com"},{"name":"raymondmayjr","email":"raymondmay@gmail.com"}],"time":{"modified":"2021-10-13T05:46:47.000Z","created":"2015-08-29T20:06:15.757Z","1.0.3":"2015-12-17T13:52:01.952Z","1.0.2":"2015-12-17T13:49:21.282Z","1.0.1":"2015-08-29T20:06:15.757Z"},"users":{"bonashen":true,"shuoshubao":true},"author":{"name":"andrey.slider@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/dayAlone/koa-webpack-hot-middleware.git"},"versions":{"1.0.3":{"name":"koa-webpack-hot-middleware","version":"1.0.3","description":"webpack hot reload middleware for koa","keywords":["koa","webpack","middleware"],"homepage":"http://github.com/dayAlone/koa-webpack-hot-middleware","author":{"name":"andrey.slider@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/dayAlone/koa-webpack-hot-middleware.git"},"bugs":{"url":"http://github.com/dayAlone/koa-webpack-hot-middleware/issues"},"licenses":"MIT","dependencies":{"webpack-hot-middleware":"2.x"},"gitHead":"e50d8454240f2818772cb0a21831d692f0a98382","_id":"koa-webpack-hot-middleware@1.0.3","scripts":{},"_shasum":"df6aafbf2d77153101e37e6a4ae70235b466f8c0","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"day-alone","email":"andrey.slider@gmail.com"},"dist":{"shasum":"df6aafbf2d77153101e37e6a4ae70235b466f8c0","size":1589,"noattachment":false,"key":"/koa-webpack-hot-middleware/-/koa-webpack-hot-middleware-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-webpack-hot-middleware/download/koa-webpack-hot-middleware-1.0.3.tgz"},"maintainers":[{"name":"day-alone","email":"andrey.slider@gmail.com"},{"name":"raymondmayjr","email":"raymondmay@gmail.com"}],"directories":{},"publish_time":1450360321952,"_cnpm_publish_time":1450360321952,"_hasShrinkwrap":false},"1.0.2":{"name":"koa-webpack-hot-middleware","version":"1.0.2","description":"webpack hot reload middleware for koa","keywords":["koa","webpack","middleware"],"homepage":"http://github.com/dayAlone/koa-webpack-hot-middleware","author":{"name":"andrey.slider@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/dayAlone/koa-webpack-hot-middleware.git"},"bugs":{"url":"http://github.com/dayAlone/koa-webpack-hot-middleware/issues"},"licenses":"MIT","dependencies":{"webpack-hot-middleware":"2.x"},"gitHead":"9948bffe8f3e7576715c53c9400f082c79644367","_id":"koa-webpack-hot-middleware@1.0.2","scripts":{},"_shasum":"c3461653b6e7dbbcb3eed18c491287cd53189ba8","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"day-alone","email":"andrey.slider@gmail.com"},"dist":{"shasum":"c3461653b6e7dbbcb3eed18c491287cd53189ba8","size":1583,"noattachment":false,"key":"/koa-webpack-hot-middleware/-/koa-webpack-hot-middleware-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-webpack-hot-middleware/download/koa-webpack-hot-middleware-1.0.2.tgz"},"maintainers":[{"name":"day-alone","email":"andrey.slider@gmail.com"},{"name":"raymondmayjr","email":"raymondmay@gmail.com"}],"directories":{},"publish_time":1450360161282,"_cnpm_publish_time":1450360161282,"_hasShrinkwrap":false},"1.0.1":{"name":"koa-webpack-hot-middleware","version":"1.0.1","description":"webpack hot reload middleware for koa","keywords":["koa","webpack","middleware"],"homepage":"http://github.com/dayAlone/koa-webpack-hot-middleware","author":{"name":"andrey.slider@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/dayAlone/koa-webpack-hot-middleware.git"},"bugs":{"url":"http://github.com/dayAlone/koa-webpack-hot-middleware/issues"},"licenses":"MIT","dependencies":{"webpack-hot-middleware":"2.x"},"gitHead":"7aee8c77e3ac66ae88009d3accdfb0d3c8eb3228","_id":"koa-webpack-hot-middleware@1.0.1","scripts":{},"_shasum":"ad585fbb907f4d6933a0f9a1ced33f3f3e7e2301","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.1.1-nightly20150824536c3d0537","_npmUser":{"name":"day-alone","email":"andrey.slider@gmail.com"},"dist":{"shasum":"ad585fbb907f4d6933a0f9a1ced33f3f3e7e2301","size":1597,"noattachment":false,"key":"/koa-webpack-hot-middleware/-/koa-webpack-hot-middleware-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-webpack-hot-middleware/download/koa-webpack-hot-middleware-1.0.1.tgz"},"maintainers":[{"name":"day-alone","email":"andrey.slider@gmail.com"},{"name":"raymondmayjr","email":"raymondmay@gmail.com"}],"directories":{},"publish_time":1440878775757,"_cnpm_publish_time":1440878775757,"_hasShrinkwrap":false}},"readme":"# koa-webpack-hot-middleware\n\nwebpack hot reload middleware for koa\n\n## Usage\n\nsame with https://github.com/glenjamin/webpack-hot-middleware\n\n# Webpack Hot Middleware\n\nWebpack hot reloading using only [webpack-dev-middleware](http://webpack.github.io/docs/webpack-dev-middleware.html). This allows you to add hot reloading into an existing server without [webpack-dev-server](http://webpack.github.io/docs/webpack-dev-server.html).\n\n## Installation & Usage\n\nSee [example/](./example/) for an example of usage.\n\nFirst, install the npm module.\n\n```sh\nnpm install --save-dev koa-webpack-hot-middleware\n```\n\nNext, enable hot reloading in your webpack config:\n\n 1. Add the following three plugins to the `plugins` array:\n    ```js\n    plugins: [\n        new webpack.optimize.OccurenceOrderPlugin(),\n        new webpack.HotModuleReplacementPlugin(),\n        new webpack.NoErrorsPlugin()\n    ]\n    ```\n    Occurence ensures consistent build hashes, hot module replacement is\n    somewhat self-explanatory, no errors is used to handle errors more cleanly.\n\n 3. Add `'webpack-hot-middleware/client'` into the `entry` array.\n    This connects to the server to receive notifications when the bundle\n    rebuilds and then updates your client bundle accordingly.\n\nNow add the middleware into your server:\n\n 1. Add `webpack-dev-middleware` the usual way\n    ```js\n    var webpack = require('webpack');\n    var webpackConfig = require('./webpack.config');\n    var compiler = webpack(webpackConfig);\n\n    app.use(require(\"webpack-dev-middleware\")(compiler, {\n        noInfo: true, publicPath: webpackConfig.output.publicPath\n    }));\n    ```\n\n 2. Add `koa-webpack-hot-middleware` attached to the same compiler instance\n    ```js\n    app.use(require(\"koa-webpack-hot-middleware\")(compiler));\n    ```\n\nAnd you're all set!\n\n## License\n\nCopyright 2015 Glen Mailer.\n\nMIT Licened.\n","_attachments":{},"homepage":"http://github.com/dayAlone/koa-webpack-hot-middleware","bugs":{"url":"http://github.com/dayAlone/koa-webpack-hot-middleware/issues"}}