{"_id":"hapi-webpack-plugin","_rev":"287056","name":"hapi-webpack-plugin","description":"Webpack middleware for Hapi. Supports HMR.","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"time":{"modified":"2021-06-03T18:39:19.000Z","created":"2015-08-25T09:44:49.951Z","3.0.0":"2018-01-29T12:18:25.369Z","2.0.0":"2017-03-31T16:01:23.804Z","1.3.0":"2015-12-02T16:02:12.645Z","1.2.2":"2015-10-24T04:53:29.128Z","1.2.1":"2015-09-10T01:35:49.799Z","1.2.0":"2015-09-09T04:22:47.830Z","1.1.0":"2015-08-25T09:44:49.951Z"},"users":{"arb":true,"n0m4dz":true,"leonardorb":true,"fengmiaosen":true},"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"versions":{"3.0.0":{"name":"hapi-webpack-plugin","version":"3.0.0","description":"Webpack middleware for Hapi. Supports HMR.","homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src --out-dir lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"keywords":["hapi","webpack","live-reload","dev-server"],"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"dependencies":{"webpack":"^3.10.0","webpack-dev-middleware":"^2.0.1","webpack-hot-middleware":"^2.21.0"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.0.3","babel-polyfill":"^6.26.0","babel-preset-env":"^1.6.1","eslint":"^4.12.1","eslint-plugin-babel":"^4.1.2"},"gitHead":"1d9544ea4336634a13426f49d2722fef3fb8c489","_id":"hapi-webpack-plugin@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"dist":{"shasum":"254b3ccb3fab6bb8e13e114cbb88c5acdc25b69a","size":7824,"noattachment":false,"key":"/hapi-webpack-plugin/-/hapi-webpack-plugin-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hapi-webpack-plugin/download/hapi-webpack-plugin-3.0.0.tgz"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hapi-webpack-plugin-3.0.0.tgz_1517228304304_0.9776001223362982"},"directories":{},"publish_time":1517228305369,"_hasShrinkwrap":false,"_cnpm_publish_time":1517228305369},"2.0.0":{"name":"hapi-webpack-plugin","version":"2.0.0","description":"Webpack middleware for Hapi. Supports HMR.","homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src --out-dir lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"keywords":["hapi","webpack","live-reload","dev-server"],"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"dependencies":{"webpack":"^2.2.0","webpack-dev-middleware":"^1.10.1","webpack-hot-middleware":"^2.17.1"},"devDependencies":{"babel":"^5.8.33","babel-eslint":"^4.1.6","eslint":"^1.10.3","eslint-plugin-babel":"^3.0.0"},"gitHead":"0e65cbed7b0dd56599122be60aea3a74b134b0d4","_id":"hapi-webpack-plugin@2.0.0","_shasum":"f1d7488c5939ca7964c9b9696cd1f98a8b2c839c","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"dist":{"shasum":"f1d7488c5939ca7964c9b9696cd1f98a8b2c839c","size":7244,"noattachment":false,"key":"/hapi-webpack-plugin/-/hapi-webpack-plugin-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hapi-webpack-plugin/download/hapi-webpack-plugin-2.0.0.tgz"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hapi-webpack-plugin-2.0.0.tgz_1490976081824_0.0549618317745626"},"directories":{},"publish_time":1490976083804,"_hasShrinkwrap":false,"_cnpm_publish_time":1490976083804},"1.3.0":{"name":"hapi-webpack-plugin","version":"1.3.0","description":"Webpack middleware for Hapi. Supports HMR.","homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src --out-dir lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"keywords":["hapi","webpack","live-reload","dev-server"],"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"dependencies":{"webpack":"^1.12.9","webpack-dev-middleware":"^1.4.0","webpack-hot-middleware":"^2.6.0"},"devDependencies":{"babel":"^5.8.33","babel-eslint":"^4.1.6","eslint":"^1.10.3","eslint-plugin-babel":"^3.0.0"},"gitHead":"b21271a7e493eb134cdee79443acee4d2200bc65","_id":"hapi-webpack-plugin@1.3.0","_shasum":"8fe7c1b25d804eaeb326ef1b618845b87196679f","_from":".","_npmVersion":"3.5.0","_nodeVersion":"5.1.0","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"dist":{"shasum":"8fe7c1b25d804eaeb326ef1b618845b87196679f","size":7191,"noattachment":false,"key":"/hapi-webpack-plugin/-/hapi-webpack-plugin-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hapi-webpack-plugin/download/hapi-webpack-plugin-1.3.0.tgz"},"directories":{},"publish_time":1449072132645,"_cnpm_publish_time":1449072132645,"_hasShrinkwrap":false},"1.2.2":{"name":"hapi-webpack-plugin","version":"1.2.2","description":"Webpack middleware for Hapi. Supports HMR.","homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src --out-dir lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"keywords":["hapi","webpack","live-reload","dev-server"],"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"dependencies":{"webpack":"^1.12.2","webpack-dev-middleware":"^1.2.0","webpack-hot-middleware":"^2.4.1"},"devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.3","eslint":"^1.7.3","eslint-plugin-babel":"^2.1.1"},"gitHead":"7afad3efd8d9c562509e986c189a6aff1ae26748","_id":"hapi-webpack-plugin@1.2.2","_shasum":"875b8751822f8de06a77351ea2d583ea44082687","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"dist":{"shasum":"875b8751822f8de06a77351ea2d583ea44082687","size":7234,"noattachment":false,"key":"/hapi-webpack-plugin/-/hapi-webpack-plugin-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/hapi-webpack-plugin/download/hapi-webpack-plugin-1.2.2.tgz"},"directories":{},"publish_time":1445662409128,"_cnpm_publish_time":1445662409128,"_hasShrinkwrap":false},"1.2.1":{"name":"hapi-webpack-plugin","version":"1.2.1","description":"Webpack middleware for Hapi. Supports HMR.","homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src --out-dir lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"keywords":["hapi","webpack","live-reload","dev-server"],"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"dependencies":{"webpack":"^1.12.1","webpack-dev-middleware":"^1.2.0","webpack-hot-middleware":"^2.0.0"},"devDependencies":{"babel":"^5.8.23","babel-eslint":"^4.1.1","eslint":"^1.3.1","eslint-plugin-babel":"^2.1.1"},"gitHead":"7697e38c0cbde5307195afd325dded062e816155","_id":"hapi-webpack-plugin@1.2.1","_shasum":"1fc1388a26002eb31eb13f28dfd77f4170c85368","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"dist":{"shasum":"1fc1388a26002eb31eb13f28dfd77f4170c85368","size":7233,"noattachment":false,"key":"/hapi-webpack-plugin/-/hapi-webpack-plugin-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hapi-webpack-plugin/download/hapi-webpack-plugin-1.2.1.tgz"},"directories":{},"publish_time":1441848949799,"_cnpm_publish_time":1441848949799,"_hasShrinkwrap":false},"1.2.0":{"name":"hapi-webpack-plugin","version":"1.2.0","description":"Webpack middleware for Hapi. Supports HMR.","homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src --out-dir lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"keywords":["hapi","webpack","live-reload","dev-server"],"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"dependencies":{"path-is-absolute":"^1.0.0","webpack":"^1.12.0","webpack-dev-middleware":"^1.2.0","webpack-hot-middleware":"^2.0.0"},"devDependencies":{"babel":"^5.8.21","babel-eslint":"^4.0.10","eslint":"^1.2.1","eslint-plugin-babel":"^2.1.1"},"gitHead":"a12f2b11251f5b2438a1bbe83c6e1d17959d9318","_id":"hapi-webpack-plugin@1.2.0","_shasum":"661a4a9bfc3a0257e94d72aa367dc614d48b4595","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"dist":{"shasum":"661a4a9bfc3a0257e94d72aa367dc614d48b4595","size":7261,"noattachment":false,"key":"/hapi-webpack-plugin/-/hapi-webpack-plugin-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hapi-webpack-plugin/download/hapi-webpack-plugin-1.2.0.tgz"},"directories":{},"publish_time":1441772567830,"_cnpm_publish_time":1441772567830,"_hasShrinkwrap":false},"1.1.0":{"name":"hapi-webpack-plugin","version":"1.1.0","description":"Webpack middleware for Hapi. Supports HMR.","homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src --out-dir lib","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/SimonDegraeve/hapi-webpack-plugin.git"},"keywords":["hapi","webpack","live-reload","dev-server"],"author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"dependencies":{"webpack":"^1.12.0","webpack-dev-middleware":"^1.2.0","webpack-hot-middleware":"^2.0.0"},"devDependencies":{"babel":"^5.8.21","babel-eslint":"^4.0.10","eslint":"^1.2.1","eslint-plugin-babel":"^2.1.1"},"gitHead":"6cd12ade6e98cf0205f5a2d2f210e88123fe1be6","_id":"hapi-webpack-plugin@1.1.0","_shasum":"4b0dce140c2e0c478aa686fb75d41fce3e2f2cbd","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"dist":{"shasum":"4b0dce140c2e0c478aa686fb75d41fce3e2f2cbd","size":7222,"noattachment":false,"key":"/hapi-webpack-plugin/-/hapi-webpack-plugin-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hapi-webpack-plugin/download/hapi-webpack-plugin-1.1.0.tgz"},"directories":{},"publish_time":1440495889951,"_cnpm_publish_time":1440495889951,"_hasShrinkwrap":false}},"readme":"# hapi-webpack-plugin\n\n[![Maintenance Status][status-image]][status-url] [![Dependency Status][deps-image]][deps-url] [![NPM version][npm-image]][npm-url]\n\n\n[Webpack](http://webpack.github.io) middleware for [Hapi](https://github.com/hapijs/hapi). Supports HMR.\n\n\n\n## Webpack Version\n\nPlease download the appropriate version for you. \n\n### **Hapi >= 17.x**\n* For **webpack >= 2.x** use version >= 3.0.0 of this package.\n\n### **Hapi <= 16.x**\n* For **webpack 1.x** use version < 1.3.0 of this package.\n* For **webpack 2.x** use version 2.x.x of this package.\n\n## Installation\n\n```js\nnpm install hapi-webpack-plugin\n```\n\n## Usage\n\nSee [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) and [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware) for all available options.\n\nYou can use the plugin in two ways.\n\n\n**1) With object as options**\n## **Hapi >= 17.x**\n```js\n/**\n * file: index.js\n */\n\n/**\n * Import dependencies\n */\nimport {Server} from 'hapi';\nimport Webpack from 'webpack';\nimport WebpackPlugin from 'hapi-webpack-plugin';\n\n/**\n * Create server\n */\nconst server = new Server({port: 3000});\n\n/**\n * Define constants\n */\nconst compiler = new Webpack({\n  // webpack configuration\n  entry: 'app.js'\n});\n\nconst assets = {\n  // webpack-dev-middleware options\n  // See https://github.com/webpack/webpack-dev-middleware\n}\n\nconst hot = {\n  // webpack-hot-middleware options\n  // See https://github.com/glenjamin/webpack-hot-middleware\n}\n\n/**\n * Register plugin and start server\n */\nasync function start() {\n  try {\n    await server.register({\n      plugin: WebpackPlugin,\n      options: {compiler, assets, hot}\n    });\n  }\n  catch (error) {\n    console.error(error);\n  }\n  \n  try {\n    server.start();\n    console.log('Server running at:', server.info.uri)\n  }\n  catch (error) {\n    console.error(error);\n  }\n}\n\nstart();\n```\n\n## **Hapi <= 16.x**\n```js\n/**\n * file: index.js\n */\n\n/**\n * Import dependencies\n */\nimport {Server} from 'hapi';\nimport Webpack from 'webpack';\nimport WebpackPlugin from 'hapi-webpack-plugin';\n\n/**\n * Create server\n */\nconst server = new Server();\nserver.connection({port: 3000});\n\n/**\n * Define constants\n */\nconst compiler = new Webpack({\n  // webpack configuration\n  entry: 'app.js'\n});\n\nconst assets = {\n  // webpack-dev-middleware options\n  // See https://github.com/webpack/webpack-dev-middleware\n}\n\nconst hot = {\n  // webpack-hot-middleware options\n  // See https://github.com/glenjamin/webpack-hot-middleware\n}\n\n/**\n * Register plugin and start server\n */\nserver.register({\n  register: WebpackPlugin,\n  options: {compiler, assets, hot}\n},\nerror => {\n  if (error) {\n    return console.error(error);\n  }\n  server.start(() => console.log('Server running at:', server.info.uri));\n});\n```\n\n**2) With path as options**\n## **Hapi >= 17**\n```js\n/**\n * file: index.js\n */\n\n/**\n * Import dependencies\n */\nimport {Server} from 'hapi';\nimport WebpackPlugin from 'hapi-webpack-plugin';\n\n\n/**\n * Create server\n */\nconst server = new Server({port: 3000});\n\n/**\n * Register plugin and start server\n */\nasync function start() {\n  try {\n    await server.register({\n      plugin: WebpackPlugin,\n      options: './webpack.config.js'\n    });\n  }\n  catch (error) {\n    console.error(error);\n  }\n  \n  try {\n    server.start();\n    console.log('Server running at:', server.info.uri)\n  }\n  catch (error) {\n    console.error(error);\n  }\n}\n\nstart();\n```\n\n## **Hapi <= 16.x**\n```js\n/**\n * file: index.js\n */\n\n/**\n * Import dependencies\n */\nimport {Server} from 'hapi';\nimport WebpackPlugin from 'hapi-webpack-plugin';\n\n\n/**\n * Create server\n */\nconst server = new Server();\nserver.connection({port: 3000});\n\n/**\n * Register plugin and start server\n */\nserver.register({\n  register: WebpackPlugin,\n  options: './webpack.config.js'\n},\nerror => {\n  if (error) {\n    return console.error(error);\n  }\n  server.start(() => console.log('Server running at:', server.info.uri));\n});\n```\n```js\n/**\n * file: webpack.config.js\n */\n\n/**\n * Export webpack configuration\n */\nexport default {\n  entry: 'app.js',\n\n  // webpack-dev-middleware options\n  // See https://github.com/webpack/webpack-dev-middleware\n  assets: {},\n\n  // webpack-hot-middleware options\n  // See https://github.com/glenjamin/webpack-hot-middleware\n  hot: {}\n};\n```\n\n## Licence\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Simon Degraeve\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[npm-url]: https://npmjs.org/package/hapi-webpack-plugin\n[npm-image]: http://img.shields.io/npm/v/hapi-webpack-plugin.svg?style=flat-square\n\n[deps-url]: https://david-dm.org/SimonDegraeve/hapi-webpack-plugin\n[deps-image]: https://img.shields.io/david/SimonDegraeve/hapi-webpack-plugin.svg?style=flat-square\n\n[status-url]: https://github.com/SimonDegraeve/hapi-webpack-plugin/pulse\n[status-image]: http://img.shields.io/badge/status-maintained-brightgreen.svg?style=flat-square\n","_attachments":{},"homepage":"https://github.com/SimonDegraeve/hapi-webpack-plugin","bugs":{"url":"https://github.com/SimonDegraeve/hapi-webpack-plugin/issues"},"license":"MIT"}