{"id":20489319,"url":"https://github.com/unfold/webpack-serve","last_synced_at":"2025-08-21T18:33:12.971Z","repository":{"id":57168979,"uuid":"71353985","full_name":"unfold/webpack-serve","owner":"unfold","description":"Takes your webpack config and creates a development server with hot module reloading and error overlay","archived":false,"fork":false,"pushed_at":"2017-11-27T15:22:08.000Z","size":130,"stargazers_count":176,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-10T13:11:49.040Z","etag":null,"topics":["cli","create-react-app","development","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unfold.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-19T12:18:51.000Z","updated_at":"2024-02-12T09:44:37.000Z","dependencies_parsed_at":"2022-09-13T08:51:26.710Z","dependency_job_id":null,"html_url":"https://github.com/unfold/webpack-serve","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfold%2Fwebpack-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfold%2Fwebpack-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfold%2Fwebpack-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfold%2Fwebpack-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unfold","download_url":"https://codeload.github.com/unfold/webpack-serve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229920727,"owners_count":18144860,"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":["cli","create-react-app","development","webpack"],"created_at":"2024-11-15T17:12:23.459Z","updated_at":"2024-12-20T03:09:26.209Z","avatar_url":"https://github.com/unfold.png","language":"JavaScript","readme":"# Webpack Serve\nTakes your webpack config and creates a development server with hot module reloading and error overlay. Built to resemble the experience you get from [create-react-app](https://github.com/facebookincubator/create-react-app).\n\n## Install\n`npm install --save-dev @unfold/webpack-serve`\n\n## Usage\n### In the terminal\nEither run `$(npm bin)/webpack-serve` at the root of your project, or add a `\"serve\": \"webpack-serve\",` to your package.json scripts. All arguments given are passed over to the [webpack CLI](https://webpack.js.org/api/cli/).\n\n### With own express/connect backend\nYou can import and configure it with your own middleware or server.\n\n```js\nimport webpackServe from '@unfold/webpack-serve'\nimport config from '../webpack.config'\nimport server from './server'\n\nwebpackServe(config, {\n  server,\n  port: 5050,\n})\n```\n\n### Options\n| name          | description                                                               | default value   |\n|-------------  |-------------------------------------------------------------------------- |---------------  |\n| port          | Port used for server                                                      | 8080            |\n| hostname      | Used by webpack and when opening the application in the browser on start  | localhost       |\n| contentBase   | Which folder to serve static content from                                 | /public         |\n| https         | Serves content with SSL                                                   | false           |\n\nPass them to `webpackServe(config, { ...options })` or use `PORT=5000 HTTPS=true webpack-serve` in the terminal.\n\n## Quick example\n```bash\nmkdir my-app \u0026\u0026 cd my-app\necho \"alert('🤓')\" \u003e index.js\nmkdir public \u0026\u0026 echo \"\u003cscript src=build.js\u003e\u003c/script\u003e\" \u003e public/index.html\nnpm install @unfold/webpack-serve\n$(npm bin)/webpack-serve index.js build.js\n```\n\nCopy the above code and run it in your terminal and you'll have a new app up and running. When you want to add webpack loaders or similar, use the [webpack CLI](https://webpack.js.org/api/cli/) options or add a `webpack.config.js` file.\n\n## Example screenshots from console and error overlay\n![screenshot showing compiled successfully](https://user-images.githubusercontent.com/1495211/28369639-8090b76c-6c98-11e7-9cd9-c9be0e983884.png)\n![screenshot showing warnings](https://user-images.githubusercontent.com/1495211/28369637-8087885e-6c98-11e7-9b23-dcdd50aa75ab.png)\n![screenshot showing error](https://user-images.githubusercontent.com/1495211/28369638-80888592-6c98-11e7-9c58-d6bbaf6b0fbe.png)\n![screenshot showing error overlay](https://user-images.githubusercontent.com/1495211/28369770-d3359f0a-6c98-11e7-86c8-880270c8eca1.png)\n\n## Credits\nThis project is using multiple utilities from `react-dev-utils` and the console look is shamelessly copied from the [create-react-app](https://github.com/facebookincubator/create-react-app) console.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfold%2Fwebpack-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funfold%2Fwebpack-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfold%2Fwebpack-serve/lists"}