{"id":16724810,"url":"https://github.com/geakstr/electron-watcher-webpack-plugin","last_synced_at":"2026-01-01T22:05:19.739Z","repository":{"id":34078110,"uuid":"169135782","full_name":"geakstr/electron-watcher-webpack-plugin","owner":"geakstr","description":"⚡️ Live reload Electron main and renderers processes with webpack plugin","archived":false,"fork":false,"pushed_at":"2022-03-24T07:10:02.000Z","size":164,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T04:43:22.782Z","etag":null,"topics":["electron","live-reload","livereload","plugin","watch","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":null,"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/geakstr.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":"2019-02-04T19:30:35.000Z","updated_at":"2020-12-21T07:30:48.000Z","dependencies_parsed_at":"2022-08-08T00:00:42.750Z","dependency_job_id":null,"html_url":"https://github.com/geakstr/electron-watcher-webpack-plugin","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/geakstr%2Felectron-watcher-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geakstr%2Felectron-watcher-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geakstr%2Felectron-watcher-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geakstr%2Felectron-watcher-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geakstr","download_url":"https://codeload.github.com/geakstr/electron-watcher-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242973963,"owners_count":20215245,"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":["electron","live-reload","livereload","plugin","watch","webpack","webpack-plugin"],"created_at":"2024-10-12T22:46:45.309Z","updated_at":"2026-01-01T22:05:14.701Z","avatar_url":"https://github.com/geakstr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Installation\n\n```shell\nnpm install electron-watcher-webpack-plugin --save\n```\n\n## Usage\n\nAdd to `webpack.config.js` plugins array:\n\n```javascript\nconst path = require(\"path\");\nconst { ElectronWatcherWebpackPlugin } = require(\"electron-watcher-webpack-plugin\");\n// ...\nmodule.exports = {\n  // ...\n  plugins: [\n    // ...\n    new ElectronWatcherWebpackPlugin({\n      // Absolute path to directory where node_modules placed. Required\n      root: __dirname,\n      // List of globs to watch for hard reload. Required\n      watch: [path.resolve(__dirname, \"./src/main\")],\n      // Launch electron only once. Default: true. Optional\n      once: true,\n      // Absolute path to nodemon executable. Default: root/node_modules/.bin/nodemon. Optional\n      nodemon: path.resolve(__dirname, \"node_modules\", \".bin\", \"nodemon\"),\n      // Absolute path to electron executable. Default: root/node_modules/.bin/electron. Optional\n      electron: path.resolve(__dirname, \"node_modules\", \".bin\", \"electron\"),\n      // Options to pass to `spawn` process. Optional\n      options: {\n        cwd: path.resolve(__dirname, \"..\")\n      }\n    }),\n    // ...\n  ];\n  // ...\n}\n```\n\nAnd watch files changes inside `main.js`:\n\n```javascript\nconst { app, BrowserWindow } = require(\"electron\");\n// ...\nrequire(\"electron-watcher-webpack-plugin\").watch({\n  // List of globs for hard refresh\n  hard: [path.resolve(__dirname, \"../main\")],\n  // List of globs for soft refresh\n  soft: [path.resolve(__dirname, \"../renderer\")]\n  // Watching enabled only in dev environment, but you can force watching anytime. Default: false. Optional\n  forceWatch: false\n});\n// ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeakstr%2Felectron-watcher-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeakstr%2Felectron-watcher-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeakstr%2Felectron-watcher-webpack-plugin/lists"}