{"_id":"@amokrushin/webpack-serve","_rev":"4-d0055f3f2a0b83e7302d6fd554e97880","name":"@amokrushin/webpack-serve","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.5":{"name":"@amokrushin/webpack-serve","version":"1.0.5","description":"A lean, modern, and flexible webpack development server","license":"MIT","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/webpack-serve.git"},"author":{"name":"Andrew Powell","email":"andrew@shellscape.org"},"homepage":"https://github.com/webpack-contrib/webpack-serve","main":"index.js","bin":{"webpack-serve":"cli.js"},"engines":{"node":">=6"},"scripts":{"beautify":"npm run lint -- --fix","ci":"npm run lint && npm run test","cover":"nyc report --reporter=text-lcov > coverage.lcov && codecov --token=$WS_CODECOV_TOKEN","cover:report":"nyc report --reporter=html","lint":"eslint index.js cli.js bin lib test examples","mocha":"mocha --require intelli-espower-loader test/test.js --full-trace --check-leaks --exit","test":"nyc npm run mocha"},"files":["lib/","cli.js","index.js"],"peerDependencies":{"webpack":"^4.0.0"},"dependencies":{"@shellscape/koa-static":"^4.0.4","@webpack-contrib/config-loader":"^1.1.1","chalk":"^2.3.0","clipboardy":"^1.2.2","cosmiconfig":"^5.0.2","debug":"^3.1.0","find-up":"^2.1.0","get-port":"^3.2.0","import-local":"^1.0.0","killable":"^1.0.0","koa":"^2.4.1","@amokrushin/koa-webpack":"^4.0.0","lodash":"^4.17.5","loud-rejection":"^1.6.0","meow":"^5.0.0","nanobus":"^4.3.1","opn":"^5.1.0","resolve":"^1.6.0","time-fix-plugin":"^2.0.0","update-notifier":"^2.3.0","url-join":"3.0.0","v8-compile-cache":"^2.0.0","@amokrushin/webpack-hot-client":"^3.0.0","webpack-log":"^1.1.2"},"devDependencies":{"@webpack-contrib/eslint-config-webpack":"^2.0.4","codecov":"^3.0.0","eslint":"^4.5.0","eslint-plugin-import":"^2.8.0","eslint-plugin-prettier":"^2.6.0","execa":"^0.10.0","intelli-espower-loader":"^1.0.1","istanbul":"^0.4.5","mocha":"^5.0.0","mocha-chrome":"^1.0.3","mock-require":"^3.0.1","node-fetch":"^2.0.0","nyc":"^11.4.1","power-assert":"^1.4.4","prettier":"^1.12.1","sinon":"^4.2.2","strip-ansi":"^4.0.0","webpack":"^4.0.0","webpack-cli":"^2.0.9","ws":"^5.0.0"},"publishConfig":{"access":"public"},"gitHead":"47bc8fa9aa6748bba01cb6e5ee04e54b78834486","bugs":{"url":"https://github.com/webpack-contrib/webpack-serve/issues"},"_id":"@amokrushin/webpack-serve@1.0.5","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"amokrushin","email":"anton@mokr.org"},"dist":{"integrity":"sha512-rZKhoLj/0L+9aP1CB1TPs3x8c//CAaFIWffR8T3b5Zh6Lh3Jaayd4RZeEDD2plDTFjQn4Ce9B+n1mnGVNQ5BdQ==","shasum":"cf97009addea9134315dd28c955c919ebbe60d3d","tarball":"https://registry.npmjs.org/@amokrushin/webpack-serve/-/webpack-serve-1.0.5.tgz","fileCount":11,"unpackedSize":39066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKnqZCRA9TVsSAnZWagAApd4QAJ9nflYdDXAHTVhJb6nJ\nF+e27Lmk0b8WIbLd2e1buGTIvd5rqyZDv6jw6YgmjNuFHJzA78IjhLWBBRM8\n+BZSZCXRRlkRsuLAxmO7ToKebj662VHK18Wf/B18jpy6ghogotPxTbc9Yk4p\nIM+mRh48o0ETcVr1h/lGtAK8upNo2x5IYoZCd+Hz9bACkeY7MUTmL66V3kG3\nkMve3JBNdWNIub9tUh8NlNnce1adp99jcW8faKPjbNOXL5Pb6Fir1s4pOQxh\ngGR8eZR7XS13cC+jWgjp7/f5V/oo40fQtwaRJWifZj0YLyNuDDcSjSaAJQ14\ngMufsVSOiKUcWItV219JCEnBTzZs9JlV8yq1PVm3KUi/tqft3+Yhkrmmb3ko\n/ck103kUyfo0V4MrY9yO/LHd2Ooj2WgF7HcUQCj3FAfJzi7xU0hgsyzePHEr\nDJwt1DsqspILtMNj0hkBKZfQfBCU7WZEkVwww8aeZ9TgPK2PvVBHa5I2mZbB\nBulZiuNM5RBShc4NRzWj0oPAHbgK7RNxdJ7AVkV0gfRRCd+NF3NuqQH/xYY2\niW18Y9MKKyZWc3CJN6AnrBmacQ+QeH33wUUWVOPU6DD+IlMltFfqiVST3xRW\nErXlQdZ5ouA9PWLjsqsPNIR2wD6/BU4RqeRQju2VahpKvpaWqcv6BwJLvUUP\nlWYh\r\n=bqnZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICqq7XPp8p0wck+nivsn3md5vb8A3F8vQw7cZOhPRy6/AiAB6583K7gVIJIn4SIQ9WVlahqdgn28Jyv21c4Nv1EjdA=="}]},"maintainers":[{"name":"amokrushin","email":"anton@mokr.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-serve_1.0.5_1529510544239_0.14484244242005828"},"_hasShrinkwrap":false},"1.1.1":{"name":"@amokrushin/webpack-serve","version":"1.1.1","description":"A lean, modern, and flexible webpack development server","license":"MIT","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/webpack-serve.git"},"author":{"name":"Andrew Powell","email":"andrew@shellscape.org"},"homepage":"https://github.com/webpack-contrib/webpack-serve","main":"index.js","bin":{"webpack-serve":"cli.js"},"engines":{"node":">=6"},"scripts":{"beautify":"npm run lint -- --fix","ci":"npm run lint && npm run test","cover":"nyc report --reporter=text-lcov > coverage.lcov && codecov --token=$WS_CODECOV_TOKEN","cover:report":"nyc report --reporter=html","lint":"eslint index.js cli.js bin lib test examples","mocha":"mocha --require intelli-espower-loader test/test.js --full-trace --check-leaks --exit","test":"nyc npm run mocha"},"files":["lib/","cli.js","index.js"],"peerDependencies":{"webpack":"^4.0.0"},"dependencies":{"@amokrushin/koa-webpack":"^4.0.0","@amokrushin/webpack-hot-client":"^3.0.0","@shellscape/koa-static":"^4.0.4","@webpack-contrib/config-loader":"^1.1.1","chalk":"^2.3.0","clipboardy":"^1.2.2","cosmiconfig":"^5.0.2","debug":"^3.1.0","find-up":"^2.1.0","get-port":"^3.2.0","import-local":"^1.0.0","killable":"^1.0.0","koa":"^2.4.1","koa-conditional-get":"^2.0.0","koa-etag":"^3.0.0","lodash":"^4.17.5","loud-rejection":"^1.6.0","meow":"^5.0.0","nanobus":"^4.3.1","opn":"^5.1.0","resolve":"^1.6.0","time-fix-plugin":"^2.0.0","update-notifier":"^2.3.0","url-join":"3.0.0","v8-compile-cache":"^2.0.0","webpack-log":"^1.1.2"},"devDependencies":{"@webpack-contrib/eslint-config-webpack":"^2.0.4","codecov":"^3.0.0","eslint":"^4.5.0","eslint-plugin-import":"^2.8.0","eslint-plugin-prettier":"^2.6.0","execa":"^0.10.0","intelli-espower-loader":"^1.0.1","istanbul":"^0.4.5","mocha":"^5.0.0","mocha-chrome":"^1.0.3","mock-require":"^3.0.1","node-fetch":"^2.0.0","nyc":"^11.4.1","power-assert":"^1.4.4","prettier":"^1.12.1","sinon":"^4.2.2","strip-ansi":"^4.0.0","webpack":"^4.0.0","webpack-cli":"^2.0.9","ws":"^5.0.0"},"publishConfig":{"access":"public"},"gitHead":"155676dce6986cc3a2a5e4c5a70597875bd375a3","bugs":{"url":"https://github.com/webpack-contrib/webpack-serve/issues"},"_id":"@amokrushin/webpack-serve@1.1.1","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"amokrushin","email":"anton@mokr.org"},"dist":{"integrity":"sha512-Cl73TCy7poi8gLGcs35sM5yqP/E2UMWn/F+ZrVPF8cnWLqUjT4u3+e4GK3uJZKQRshZ7rg7zbgllyOWf1bn9kQ==","shasum":"f3283700b5d5215a4be2003b56fdf90519dfab4c","tarball":"https://registry.npmjs.org/@amokrushin/webpack-serve/-/webpack-serve-1.1.1.tgz","fileCount":11,"unpackedSize":39261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLyaLCRA9TVsSAnZWagAAIB8P/1JtAgsfL7vY75ZOfW+I\nYAWANskY+4icLUiFc2B0akdBEnq2TqGbJkFa4FvkdR1tFw64LViFKo6LifQo\nYefr/fh3hXYj7mAy76OXD1Gmpbw9CXchu2jXs6KRfPHMGlpboDOj86UQWTp9\nLXksDrMk3jA1tyfbnqOGFSYJQ3OT77rOAZ1au2fo8r+/7FchITZiRnwECsOZ\ne37QqUwk3CG8qxYUGH7hMA86P8xmX8O8CZUeDPWTynsGBrGOWwEbGBeQPzI9\nL+E1xY5x0kqLxTf5UVFWNiM2E9mtWgVbJU26pGXtqIk2SMtgCYXre+fY50Qp\nUNFWOtUjyikzbINbF0D9HAB+Bvuagcrp2CbRWRY4kPXJR4RhXOnjh6XE025G\n5Vz+70lc2GqAYm3RrXGGQZ07PEUkqtqO8PHJqid6HZMnx3FFBnoAYyaI0caM\np4Xro0vHurN76oXV8K+vey4CLMk70GkO68GW3iTN65lTKUiuPIR+lOGAsWmK\ndCLIEFB/abyesNzXOUAhbyZeG5oO41XinI2saHRu01fYYu+npTbBE7CIwCD3\nj8klCI6rCIJmfh0pmnQv9h+FdQ2naa3KYzPvn+3v1bypAOQFWUs5D7XqAHIU\nYIdgRZoYLyqUS5KiRJyByMr6O3HWl0iVZNBw9rmUjktKgQdCFfK6+Wr9m8C+\nMCsO\r\n=sd+j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0ux3sk7OJBvrxOS4fdFlTIRU720e+T7mKlYgj2etEvQIgHxumWZWw49FsyNVdQZpkkrdP5kbavFkdBOwMAnaq/HI="}]},"maintainers":[{"name":"amokrushin","email":"anton@mokr.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-serve_1.1.1_1529816715184_0.4137700341821977"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-20T16:02:23.588Z","1.0.5":"2018-06-20T16:02:24.313Z","modified":"2022-04-04T13:50:34.853Z","1.1.0":"2018-06-24T04:42:33.515Z","1.1.1":"2018-06-24T05:05:15.320Z"},"maintainers":[{"name":"amokrushin","email":"anton@mokr.org"}],"description":"A lean, modern, and flexible webpack development server","homepage":"https://github.com/webpack-contrib/webpack-serve","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/webpack-serve.git"},"author":{"name":"Andrew Powell","email":"andrew@shellscape.org"},"bugs":{"url":"https://github.com/webpack-contrib/webpack-serve/issues"},"license":"MIT","readme":"<div align=\"center\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n  </a>\n</div>\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![tests][tests]][tests-url]\n[![coverage][cover]][cover-url]\n[![chat][chat]][chat-url]\n\n# webpack-serve\n\nA lean, modern, and flexible webpack development server\n\n## Browser Support\n\nBecause this module leverages _native_ `WebSockets` via `webpack-hot-client`,\nthe browser support for this module is limited to only those browsers which\nsupport native `WebSocket`. That typically means the last two major versions\nof a particular browser. You may view a table of\n[compatible browsers here](https://caniuse.com/#feat=websockets).\n\n_Note: We won't be accepting requests for changes to this facet of the module._\n\n## Getting Started\n\nTo begin, you'll need to install `webpack-serve`:\n\n```console\n$ npm install webpack-serve --save-dev\n```\n\n## CLI\n\n```console\n$ webpack-serve --help\n\n  Options\n    --config            The webpack config to serve. Alias for <config>.\n    --content           The path from which content will be served\n                        Default: process.cwd()\n    --dev               A JSON object containing options for webpack-dev-middleware\n    --help              Show usage information and the options listed here.\n    --host              The host the app should bind to\n    --hot               A JSON object containing options for webpack-hot-client\n    --http2             Instruct the server to use HTTP2\n    --https-cert        Specify a cert to enable https. Must be paired with a key\n    --https-key         Specify a key to enable https. Must be paired with a cert\n    --https-pass        Specify a passphrase to enable https. Must be paired with a pfx file\n    --https-pfx         Specify a pfx file to enable https. Must be paired with a passphrase\n    --log-level         Limit all process console messages to a specific level and above\n                        Levels: trace, debug, info, warn, error, silent\n    --log-time          Instruct the logger for webpack-serve and dependencies to display a timestamp\n    --no-clipboard      Instructs the server not to copy the server URI to the clipboard when starting\n    --no-hot            Instruct the client not to apply Hot Module Replacement patches\n    --no-reload         Instruct middleware {italic not} to reload the page for build errors\n    --open              Instruct the app to open in the default browser\n    --open-app          The name of the app to open the app within, or an array\n                        containing the app name and arguments for the app\n    --open-path         The path with the app a browser should open to\n    --port              The port the app should listen on\n    --require, -r       Preload one or more modules before loading the webpack configuration\n    --version           Display the webpack-serve version\n\n  Examples\n    $ webpack-serve ./webpack.config.js --no-reload\n    $ webpack-serve --config ./webpack.config.js --port 1337\n    $ webpack-serve --port 1337  # config can be omitted for webpack v4+ only\n```\n\n_Note: The CLI will use your local install of webpack-serve when available,\neven when run globally._\n\n### Running the CLI\n\nThere are a few variations for using the base CLI command, and starting\n`webpack-serve`:\n\n```console\n  $ webpack-serve ./webpack.config.js\n  $ webpack-serve --config ./webpack.config.js\n```\n\nThose two commands are synonymous. Both instruct `webpack-serve` to load the\nconfig from the specified path. We left the flag in there because some folks\nlike to be verbose, so why not.\n\n```console\n  $ webpack-serve\n```\n\nAnd for the folks using webpack v4 or higher, you can instruct `webpack-serve` to\nkick off a webpack build without specifying a config. Keep in mind that this will\napply the default config within webpack, and your project must conform to that\nfor a successful build to happen.\n\nWhen running `$ webpack-serve` without arguments in webpack v3 and lower, the CLI\nwill display help and usage information. In order to accommodate the zero-config\nchanges in webpack v4, users of webpack v4 will need to use the `--help` flag to\ndisplay the same information.\n\n## `webpack-serve` Config\n\nYou can store and define configuration / options for `webpack-serve` in a number\nof different ways. This module leverages [cosmiconfig](https://github.com/davidtheclark/cosmiconfig),\nwhich allows you to define `webpack-serve` options in the following ways:\n\n- in your package.json file in a `serve` property\n- in a `.serverc` or `.serverc.json` file, in either JSON or YML.\n- in a `serve.config.js` file which exports a CommonJS module (just like webpack).\n\nIt's most common to keep `serve` options in your `webpack.config.js` (see below),\nhowever, you can utilize any of the options above _in tandem_ with\n`webpack.config.js`, and the options from the two sources will be merged. This\ncan be useful for setups with multiple configs that share common options for\n`webpack-serve`, but require subtle differences.\n\n### Webpack Config `serve` Property\n\n`webpack-serve` supports the `serve` property in your webpack config file, which\nmay contain any of the supported [options](#options).\n\n### Setting the Config `mode`\n\nShould you find that the `mode` property of your webpack config file needs to be\nset dynamically the following pattern can be used:\n\n```json\n  mode: process.env.WEBPACK_SERVE ? 'development' : 'production',\n```\n\n## API\n\nWhen using the API directly, the main entry point  is the `serve` function, which\nis the default export of the module.\n\n```js\nconst serve = require('webpack-serve');\nconst config = require('./webpack.config.js');\n\nserve({ config });\n```\n\n### serve([options])\n\nReturns [a `Promise` which resolves] an `Object` containing:\n\n- `close()` *(Function)* - Closes the server and its dependencies.\n- `on(eventName, fn)` *(Function)* - Binds a serve event to a function. See\n[Events](#events).\n\n#### options\n\nType: `Object`\n\nOptions for initializing and controlling the server provided.\n\n##### add\n\nPlease see [Add-On Features](#add-on-features).\n\n##### compiler\n\nType: `webpack`  \nDefault: `null`\n\nAn instance of a `webpack` compiler. A passed compiler's config will take\nprecedence over `config` passed in options.\n\n_Note: Any `serve` configuration must be removed from the webpack config used\nto create the compiler instance, before you attempt to create it, as it's not\na valid webpack config property._\n\n##### config\n\nType: `Object`  \nDefault: `{}`\n\nAn object containing the configuration for creating a new `webpack` compiler\ninstance.\n\n##### content\n\nType: `String|[String]`  \nDefault: `process.cwd()`\n\nThe path, or array of paths, from which content will be served.\n\n<!-- intentionally out of alphabetic order -->\n##### clipboard\n\nType: `Boolean`  \nDefault: `true`\n\nIf true, the server will copy the server URI to the clipboard when the server is\nstarted.\n\n##### dev\n\nType: `Object`  \nDefault: `{ publicPath: '/' }`\n\nAn object containing options for [webpack-dev-middleware][dev-ware].\n\n##### host\n\nType: `String`  \nDefault: `'localhost'`\n\nSets the host that the server will listen on. eg. `'10.10.10.1'`\n\n_Note: This value must match any value specified for `hot.host` or\n`hot.host.server`, otherwise `webpack-serve` will throw an error. This\nrequirement ensures that the `koa` server and `WebSocket` server play nice\ntogether._\n\n##### hot\n\nType: `Object|Boolean`  \nDefault: `{}`\n\nAn object containing options for [webpack-hot-client][hot-client].  \n\nAs of `v0.2.1` setting this to `false` will completely disable `webpack-hot-client`\nand all automatic Hot Module Replacement functionality. This is akin to the\n`--no-hot-client` CLI flag.\n\n##### http2\n\nType: `Boolean`  \nDefault: `false`\n\nIf using Node v9 or greater, setting this option to `true` will enable HTTP2\nsupport.\n\n##### https\n\nType: `Object`  \nDefault: `null`\n\nPassing this option will instruct `webpack-serve` to create and serve the webpack\nbundle and accompanying content through a secure server. The object should\ncontain properties matching:\n\n```js\n{\n  key: fs.readFileSync('...key'),   // Private keys in PEM format.\n  cert: fs.readFileSync('...cert'), // Cert chains in PEM format.\n  pfx: <String>,                    // PFX or PKCS12 encoded private key and certificate chain.\n  passphrase: <String>              // A shared passphrase used for a single private key and/or a PFX.\n}\n```\n\nSee the [Node documentation][https-opts] for more information. For SSL\nCertificate generation, please read the\n[SSL Certificates for HTTPS](#ssl-certificates-for-https) section.\n\n##### logLevel\n\nType: `String`  \nDefault: `info`\n\nInstructs `webpack-serve` to output information to the console/terminal at levels\nhigher than the specified level. Valid levels:\n\n```js\n[\n  'trace',\n  'debug',\n  'info',\n  'warn',\n  'error'\n]\n```\n\n##### logTime\n\nType: `Boolean`  \nDefault: `false`\n\nInstruct `webpack-serve` to prepend each line of log output with a `[HH:mm:ss]`\ntimestamp.\n\n##### on\n\nType: `Object`  \nDefault: `null`\n\nWhile running `webpack-serve` from the command line, it can sometimes be useful\nto subscribe to events from the module's event bus _within your config_. This\noption can be used for that purpose. The option's value must be an `Object`\nmatching a `key:handler`, `String: Function` pattern. eg:\n\n```js\non: {\n  'listening': () => { console.log('listening'); }\n}\n```\n\n##### open\n\nType: `Boolean|Object`  \nDefault: `false`\n\nInstruct the module to open the served bundle in a browser. Accepts an `Object`\nthat matches:\n\n```js\n{\n  app: <String>, // The proper name of the browser app to open.\n  path: <String> // The url path on the server to open.\n}\n```\n\n_Note: Using the `open` option will disable the `clipboard` option._\n\n##### port\n\nType: `Number`  \nDefault: `8080`\n\nThe port the server should listen on.\n\n## Events\n\nThe server created by `webpack-serve` emits select events which can be\nsubscribed to. All events are emitted with a single `Object` parameter,\ncontaining named properties for relevant data.\n\nFor example:\n\n```js\nconst serve = require('webpack-serve');\nconst config = require('./webpack.config.js');\n\nserve({ config }).then((server) => {\n  server.on('listening', ({ server, options }) => {\n    console.log('happy fun time');\n  });\n});\n```\n\n#### build-started\n\nArguments:  \n  [`Compiler`](https://webpack.js.org/api/node/#compiler-instance) _compiler_\n\nEmitted when a compiler has started a build.\n\n#### build-finished\n\nArguments:  \n  [`Stats`](https://webpack.js.org/api/node/#stats-object) _stats_  \n  [`Compiler`](https://webpack.js.org/api/node/#compiler-instance) _compiler_\n\nEmitted when a compiler has finished a build.\n\n#### compiler-error\n\nArguments:  \n  [`Stats`](https://webpack.js.org/api/node/#stats-tojson-options-) _json_\n  [`Compiler`](https://webpack.js.org/api/node/#compiler-instance) _compiler_\n\nEmitted when a compiler has encountered and error, or a build has errors.\n\n#### compiler-warning\n\nArguments:  \n  [`Stats`](https://webpack.js.org/api/node/#stats-tojson-options-) _json_\n  [`Compiler`](https://webpack.js.org/api/node/#compiler-instance) _compiler_\n\nEmitted when a compiler has encountered a warning, or a build has warnings.\n\n#### listening\n\nArguments:  \n  `Koa` _server_  \n  `Object` _options_\n\nEmitted when the server begins listening for connections.\n\n## SSL Certificates for HTTPS\n\nUnlike webpack-dev-server, `webpack-serve` does not ship with SSL Certificate\ngeneration, nor does it ship with a built-in certificate for use with HTTPS\nconfigurations. This is due largely in part to past security concerns and the\ncomplexity of use-cases in the webpack ecosystem.\n\nWe do however, recommend a path for users to generate their own SSL Certificates\nsafely and efficiently. That path resides in\n[`devcert-cli`](https://github.com/davewasmer/devcert-cli); an excellent project\nthat automates the creation of trusted SSL certificates that will work\nwonderfully with `webpack-serve`.\n\n## Add-on Features\n\nA core tenant of `webpack-serve` is to stay lean in terms of feature set, and to\nempower users with familiar and easily portable patterns to implement the same\nfeatures that those familiar with `webpack-dev-server` have come to rely on. This\nmakes the module far easier to maintain, which ultimately benefits the user.\n\nLuckily, flexibility baked into `webpack-serve` makes it a snap to add-on features.\nYou can leverage this by using the `add` option. The value of the option should\nbe a `Function` matching the following signature:\n\n```js\nadd: (app, middleware, options) => {\n  // ...\n}\n```\n\n### `add` Function Parameters\n\n- `app` The underlying Koa app\n- `middleware` An object containing accessor functions to call both\n`webpack-dev-middleware` and the `koa-static` middleware.\n- `options` - The internal options object used by `webpack-serve`\n\nSome add-on patterns may require changing the order of middleware used in the\n`app`. For instance, if adding routes or using a separate router with the `app`\nwhere routes must be added last, you'll need to call the `middleware` functions\nearly on. `webpack-serve` recognizes these calls and will not execute them again.\nIf these calls were omitted, `webpack-serve` would execute both in the default,\nlast in line, order.\n\n```js\nadd: (app, middleware, options) => {\n  // since we're manipulating the order of middleware added, we need to handle\n  // adding these two internal middleware functions.\n  middleware.webpack();\n  middleware.content();\n\n  // router *must* be the last middleware added\n  app.use(router.routes());\n}\n```\n\nListed below are some of the add-on patterns and recipes that can be found in\n[docs/addons](docs/addons):\n\n- [bonjour](docs/addons/bonjour.config.js)\n- [compress](docs/addons/compress)\n- [historyApiFallback](docs/addons/history-fallback.config.js)\n- [proxy + history fallback](docs/addons/proxy-history-fallback.config.js)\n- [proxy + router](docs/addons/proxy-router.config.js)\n- [reuse Chrome tab](docs/addons/reuse-chrome-tab)\n- [staticOptions](docs/addons/static-content-options.config.js)\n- [useLocalIp](docs/addons/local-ip.config.js)\n- [watch content](docs/addons/watch-content.config.js)\n\n### Community Add-ons\n\n_Note: The list below contains `webpack-serve` add-ons created by the community.\nInclusion in the list does not imply a module is preferred or recommended\nover others._\n\n- [webpack-serve-waitpage](https://github.com/elisherer/webpack-serve-waitpage):\nDisplays build progress in the client during complilation.\n\n## Contributing\n\nWe welcome your contributions! Please have a read of\n[CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to get involved.\n\n## License\n\n#### [MIT](./LICENSE)\n\n[npm]: https://img.shields.io/npm/v/webpack-serve.svg\n[npm-url]: https://npmjs.com/package/webpack-serve\n\n[node]: https://img.shields.io/node/v/webpack-serve.svg\n[node-url]: https://nodejs.org\n\n[deps]: https://david-dm.org/webpack-contrib/webpack-serve.svg\n[deps-url]: https://david-dm.org/webpack-contrib/webpack-serve\n\n[tests]: \thttps://img.shields.io/circleci/project/github/webpack-contrib/webpack-serve.svg\n[tests-url]: https://circleci.com/gh/webpack-contrib/webpack-serve/tree/master\n\n[cover]: https://codecov.io/gh/webpack-contrib/webpack-serve/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/webpack-serve\n\n[chat]: https://badges.gitter.im/webpack/webpack.svg\n[chat-url]: https://gitter.im/webpack/webpack\n\n[dev-ware]: https://github.com/webpack/webpack-dev-middleware#options\n[hot-client]: https://github.com/webpack-contrib/webpack-hot-client#options\n[https-opts]: https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options\n","readmeFilename":"README.md"}