{"id":20630739,"url":"https://github.com/sysgears/node-hmr-plugin","last_synced_at":"2025-10-26T01:32:27.881Z","repository":{"id":66053094,"uuid":"199618968","full_name":"sysgears/node-hmr-plugin","owner":"sysgears","description":"Webpack plugin for running node process in development mode with HMR","archived":false,"fork":false,"pushed_at":"2019-08-12T13:25:40.000Z","size":31452,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-26T01:32:15.248Z","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/sysgears.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-07-30T09:22:31.000Z","updated_at":"2021-04-28T02:59:30.000Z","dependencies_parsed_at":"2024-01-23T21:35:32.032Z","dependency_job_id":null,"html_url":"https://github.com/sysgears/node-hmr-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sysgears/node-hmr-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fnode-hmr-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fnode-hmr-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fnode-hmr-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fnode-hmr-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysgears","download_url":"https://codeload.github.com/sysgears/node-hmr-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysgears%2Fnode-hmr-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281047793,"owners_count":26435124,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-16T14:09:25.658Z","updated_at":"2025-10-26T01:32:27.862Z","avatar_url":"https://github.com/sysgears.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node HMR Webpack Plugin\n\n[![Build Status](https://travis-ci.org/sysgears/webpack-virtual-modules.svg?branch=master)](https://travis-ci.org/sysgears/webpack-virtual-modules)\n[![Twitter Follow](https://img.shields.io/twitter/follow/sysgears.svg?style=social)](https://twitter.com/sysgears)\n\n**`node-hmr-plugin`** is a Webpack plugin that allows running your Node app during\ndevelopment in such a way that it doesn't interfere with Webpack Hot Module Replacement.\n\nWhen you utilize Webpack HMR during Node server app development, the Webpack normally reloads\napp code itself. You shouldn't watch for source code changes with external tool like `nodemon`, because Webpack will picks up changes itself and in more efficient way.\nHowever, if your app crashes, it should be re-started after you changed source code and Webpack\ncompilation finished. The plugin is exactly about supporting this workflow.\n\n# Installation\n\nUse Yarn or NPM to install Node HMR Webpack Plugin as a development dependency:\n\n```bash\n# with Yarn\nyarn add -D node-hmr-plugin\n\n# with NPM\nnpm install -D node-hmr-plugin\n```\n\n## Configuration\n\nThe plugin will do nothing in non-watch mode. In watch mode, the plugin will launch\nnode application and try to restart it when application crashed and new code changes\nwere made.\n\n**webpack.config.js**\n\n```js\nconst NodeHmrPlugin = require('node-hmr-plugin');\n\nmodule.exports = [\n  target: 'node',\n  ...\n  plugins: [\n    new HotModuleReplacementPlugin(),\n    new NodeHmrPlugin()\n  ]\n};\n```\n\n## Plugin options\n\n### cmd *(string) (default='{app}')*\nCommand template string default: `'{app}'`, it can be for example:\n`'--inspect {app} some_arg'`. The `{app}` is replaced with actual path to the compiled bundle.\n\n### restartOnExitCodes *(number[]) (default=none)*\nExit code list that should result in app restart, immediately. It can be used\nto handle the edge case when Webpack fails to apply HMR. For example, you can have the code\nlike this inside your app:\n```js\nmodule.hot.status(event =\u003e {\n  if (event === 'abort' || event === 'fail') {\n    process.exit(250);\n  }\n});\n```\n\nand pass `restartOnExitCodes: [250]` option to the plugin to force immediate application\nre-start on HMR failure.\n\n### logLevel *(string) (default='info')*\nLog level, one of `trace`, `debug`, `info`, `warn`, `error`, `silent`. If you want to silence\nplugin, pass `logLevel: 'info'` option.\n\n## License\n\nCopyright © 2019 [SysGears (Cyprus) Limited]. This source code is licensed under the [MIT] license.\n\n[MIT]: LICENSE\n[SysGears (Cyprus) Limited]: http://sysgears.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysgears%2Fnode-hmr-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysgears%2Fnode-hmr-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysgears%2Fnode-hmr-plugin/lists"}