{"id":13671273,"url":"https://github.com/shellscape/webpack-serve","last_synced_at":"2025-04-07T19:16:49.791Z","repository":{"id":47012561,"uuid":"153392853","full_name":"shellscape/webpack-serve","owner":"shellscape","description":"A CLI for webpack-plugin-serve, providing a premier webpack development server","archived":false,"fork":false,"pushed_at":"2024-09-06T09:54:50.000Z","size":1292,"stargazers_count":52,"open_issues_count":3,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T16:15:03.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shellscape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"shellscape","custom":"https://paypal.me/shellscape","liberapay":"shellscape"}},"created_at":"2018-10-17T03:55:30.000Z","updated_at":"2025-01-09T17:55:16.000Z","dependencies_parsed_at":"2024-11-16T19:02:47.228Z","dependency_job_id":"c20b7a30-257d-46d5-a956-0f51616e36c2","html_url":"https://github.com/shellscape/webpack-serve","commit_stats":{"total_commits":180,"total_committers":31,"mean_commits":5.806451612903226,"dds":0.3944444444444445,"last_synced_commit":"db1f0ab9230b7696eab5d9857f95a0f14e865fa4"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fwebpack-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fwebpack-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fwebpack-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellscape%2Fwebpack-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellscape","download_url":"https://codeload.github.com/shellscape/webpack-serve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713258,"owners_count":20983683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T09:01:04.718Z","updated_at":"2025-04-07T19:16:49.761Z","avatar_url":"https://github.com/shellscape.png","language":"JavaScript","readme":"[tests]: \thttps://img.shields.io/circleci/project/github/shellscape/webpack-serve.svg\n[tests-url]: https://circleci.com/gh/shellscape/webpack-serve\n\n[cover]: https://codecov.io/gh/shellscape/webpack-serve/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/shellscape/webpack-serve\n\n[size]: https://packagephobia.now.sh/badge?p=webpack-serve\n[size-url]: https://packagephobia.now.sh/result?p=webpack-serve\n\n[https]: https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener\n[http2]: https://nodejs.org/api/http2.html#http2_http2_createserver_options_onrequesthandler\n[http2tls]: https://nodejs.org/api/http2.html#http2_http2_createsecureserver_options_onrequesthandler\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg width=\"256\" src=\"https://raw.githubusercontent.com/shellscape/webpack-serve/master/assets/serve.svg?sanitize=true\" alt=\"webpack-serve\"\u003e\u003cbr/\u003e\u003cbr/\u003e\n\u003c/div\u003e\n\n[![tests][tests]][tests-url]\n[![cover][cover]][cover-url]\n[![size][size]][size-url]\n\n# webpack-serve\n\nA CLI for [`webpack-plugin-serve`](https://github.com/shellscape/webpack-plugin-serve) - A Webpack development server in a plugin.\n\n_(While using a CLI such as webpack-serve is convenient, we recommend using [`webpack-plugin-serve`](https://github.com/shellscape/webpack-plugin-serve) directly in your webpack config, with [`webpack-nano`](https://github.com/shellscape/webpack-nano), instead.)_\n\n\u003ca href=\"https://www.patreon.com/shellscape\"\u003e\n  \u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"\u003e\n\u003c/a\u003e\n\n_Please consider donating if you find this project useful._\n\n## Requirements\n\n`webpack-serve` is an [evergreen 🌲](./.github/FAQ.md#what-does-evergreen-mean) module.\n\nThis module requires an [Active LTS](https://github.com/nodejs/Release) Node version (v8.0.0+ or v10.0.0+). The client scripts in this module require [browsers which support `async/await`](https://caniuse.com/#feat=async-functions). Users may also choose to compile the client script via an appropriately configured [Babel](https://babeljs.io/) webpack loader for use in older browsers.\n\n## Feature Parity\n\nSince this CLI leverages `webpack-plugin-serve`, the same feature parity information applies. Please see the [`webpack-plugin-serve` Feature Comparison](https://github.com/shellscape/webpack-plugin-serve/blob/HEAD/.github/FEATURES.md) for more information.\n\n## Install\n\nUsing npm:\n\n```console\nnpm install webpack-serve --save-dev\n```\n\n## Usage\n\n```console\nA CLI for webpack-plugin-serve, providing a premier webpack development server\n\nUsage\n  $ webpack-serve [...options]\n\nOptions\n  --all               Apply webpack-plugin-serve to all compilers in the config\n  --client.address    Overrides the WebSocket address in the client\n  --client.retry      Instructs the client to attempt to reconnect all WebSockets when interrupted\n  --client.silent     Instructs the client not to log anything to the console.\n  --compress          Enables compression middleware which serves files with GZip compression.\n  --config            A path to a webpack config file\n  --config.{name}     A path to a webpack config file, and the config name to run\n  --help              Displays this message\n  --history-fallback  Enables History API Fallback\n  --hmr               Enables Hot Module Replacement. On by default\n  --host              Sets the host the server should listen from\n  --http2             Instructs the server to enable HTTP2\n  --live-reload       Instructs the client to perform a full page reload after each build\n  --no-watch          Does not apply \\`watch: true\\` to the config, allowing for greater customization\n  --open              Opens the default browser to the set host and port\n  --port              Sets the port on which the server should listen\n  --progress          Shows build progress in the client\n  --silent            Instruct the CLI to produce no console output\n  --static            Sets the directory from which static files will be served\n  --status            Shows build status (errors, warnings) in the client\n  --version           Displays webpack-nano and webpack versions\n  --wait-for-build    Instructs the server to halt middleware processing until the current build is done.\n\nExamples\n  $ webpack-serve\n  $ webpack-serve --help\n  $ webpack-serve --config webpack.config.js\n  $ webpack-serve --config.serve webpack.config.js\n```\n\n## Flags\n\nPlease reference the [`webpack-plugin-serve` Options](https://github.com/shellscape/webpack-plugin-serve#options) for information and use. Most options are analogous to the flags listed above.\n\n#### `--no-watch`\n\nBy default, the CLI will apply `watch: true` to the first config in the targeted webpack config file. To customize watching or `watchOptions`, please use this flag and customize the config(s) accordingly.\n\n## package.json Options\n\nFor convenience, `webpack-plugin-serve` options can also be defined in a `package.json` file. This CLI will look for a `serve` key in the nearest `package.json` beginning in the directory containing the specified `webpack.config.js`, up to the current working directory. Please reference the [`webpack-plugin-serve` Options](https://github.com/shellscape/webpack-plugin-serve#options) for information and use.\n\nFor Example:\n\n```json\n{\n\t\"name\": \"some-package\",\n\t\"version\": \"1.0.0\",\n\t\"serve\": {\n    \"host\": \"10.10.10.1\"\n  }\n}\n```\n\n## Advanced Options\n\nFor options which require providing functions or complex objects like `Promises` which cannot be represented by JSON, nor on the command line, please use [`webpack-plugin-serve`](https://github.com/shellscape/webpack-plugin-serve) directly in your webpack config, along with [`webpack-nano`](https://github.com/shellscape/webpack-nano).\n\n## Meta\n\n[CONTRIBUTING](./.github/CONTRIBUTING.md)\n\n[LICENSE (Mozilla Public License)](./LICENSE)\n","funding_links":["https://patreon.com/shellscape","https://paypal.me/shellscape","https://liberapay.com/shellscape","https://www.patreon.com/shellscape"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellscape%2Fwebpack-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellscape%2Fwebpack-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellscape%2Fwebpack-serve/lists"}