{"id":22372344,"url":"https://github.com/romaleev/webpack-dev-server-restartable","last_synced_at":"2025-07-19T08:04:19.512Z","repository":{"id":41586930,"uuid":"270756561","full_name":"romaleev/webpack-dev-server-restartable","owner":"romaleev","description":"Restartable https://github.com/webpack/webpack-dev-server","archived":false,"fork":false,"pushed_at":"2023-01-06T15:53:52.000Z","size":1915,"stargazers_count":0,"open_issues_count":23,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T19:05:08.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romaleev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-08T17:14:20.000Z","updated_at":"2020-11-02T09:37:09.000Z","dependencies_parsed_at":"2023-02-06T06:15:42.508Z","dependency_job_id":null,"html_url":"https://github.com/romaleev/webpack-dev-server-restartable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/romaleev/webpack-dev-server-restartable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fwebpack-dev-server-restartable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fwebpack-dev-server-restartable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fwebpack-dev-server-restartable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fwebpack-dev-server-restartable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romaleev","download_url":"https://codeload.github.com/romaleev/webpack-dev-server-restartable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fwebpack-dev-server-restartable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262834786,"owners_count":23371849,"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-12-04T20:37:40.475Z","updated_at":"2025-06-30T19:05:08.432Z","avatar_url":"https://github.com/romaleev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-dev-server-restartable\n\nRestartable [webpack-dev-server](https://www.npmjs.com/package/webpack-dev-server)\n\nAdds to `webpack-dev-server` ability to automatically restart when webpack config or server file changes. \n\nRestarts x10 times faster than command line alternative `nodemon + webpack-dev-server`\n\nPowered by Node.js require cache clean.\n\nRequires peer dependencies of `webpack` and `webpack-dev-server` \n\n`webpack-dev-server` options should be in `devServer` field of webpack config.\n\n### Command line examples\n```\nwebpack-dev-server-restartable --watch test/server.sample.js --watch test/webpack.config.sample.js --config test/webpack.config.sample.js\n```\n\nWhich is alternative to:\n```\nnodemon --watch test/webpack.config.sample.js --watch test/server.sample.js --exec 'webpack-dev-server --config test/webpack.config.sample.js'\n```\n\n### Options\n\nName | Type | Default | Description \n--- | --- | --- | ---\n**`config`** | `{String}` |  | Webpack config which includes `devServer` options and passed to `webpack-dev-server`\n**`watch`** | `{String}` |  | Path which if is monitored for changes - restarts `webpack-dev-server` \n**`stop`** | `{String}` |  | Path which if is monitored for changes - stops `webpack-dev-server`\n**`verbose`** | `{Boolean}` | true | Enables verbose logging for `webpack-dev-server-restartable`, like [wds] and [wds + wdm] timings\n**`silent`** | `{Boolean}` | false | Supress all logs from `webpack-dev-server-restartable`, including restarting notifications\n**`fastboot`** | `{Boolean}` | true | Enables [fast-boot](https://www.npmjs.com/package/fast-boot) `_resolveFilename` cache\n\n### Consistency\n\nBecause `webpack-dev-sever` restarts without full process reload there might be plugins that need invalidation.\n\nIn order to achieve this you can add optional function `devServer.onExit`\n\n`browser-sync-webpack-plugin` is invalidated by default.\n\n```\nconst config = {\n    // ...\n    devServer: {\n        // ...\n        onExit: () =\u003e { /* invalidate, like browserSync.cleanup() */  }\n    }\n    // ...\n} \n``` \n\n### Node.js example\n\n```\n    const server = new WebpackDevServerRestartable({ config, watch, stop, verbose, silent, fastboot })\n    server.listen()\n```\n\n### Benchmark\n\nYou can run start and restart speed benchmarks locally:\n\n```\n   npm run test\n```\n\n### Benchmark Options\n\nName | Type | Default | Description \n--- | --- | --- | ---\n**`webpackConfig`** | `{String}` |  | Webpack config which includes `devServer` options and passed to `webpack-dev-server`\n**`serverConfig`** | `{String}` |  | Server config which is required in `devServer.after` option\n**`verbose`** | `{Boolean}` | false | Enables verbose logging\n\nExample\n\n```\n   verbose=true webpackConfig=test/webpack.config.sample.js serverConfig=test/server.sample.js npm run test\n```\n\nAll `NODE_ENV` variables also applies to `webpack-dev-server` itself.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromaleev%2Fwebpack-dev-server-restartable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromaleev%2Fwebpack-dev-server-restartable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromaleev%2Fwebpack-dev-server-restartable/lists"}