{"id":26023101,"url":"https://github.com/litilexuezha/webpack-config-reload","last_synced_at":"2026-04-21T13:34:13.774Z","repository":{"id":57156153,"uuid":"287707782","full_name":"LitileXueZha/webpack-config-reload","owner":"LitileXueZha","description":"热加载 webpack 配置。修改 webpack 相关配置文件后，自动重启脚本命令，比如 dev-server","archived":false,"fork":false,"pushed_at":"2021-05-20T15:22:34.000Z","size":22,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T04:01:52.627Z","etag":null,"topics":["cli","configuration","reload","webpack"],"latest_commit_sha":null,"homepage":"","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/LitileXueZha.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-08-15T08:27:11.000Z","updated_at":"2021-05-20T15:22:36.000Z","dependencies_parsed_at":"2022-08-28T14:00:23.307Z","dependency_job_id":null,"html_url":"https://github.com/LitileXueZha/webpack-config-reload","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitileXueZha%2Fwebpack-config-reload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitileXueZha%2Fwebpack-config-reload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitileXueZha%2Fwebpack-config-reload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitileXueZha%2Fwebpack-config-reload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LitileXueZha","download_url":"https://codeload.github.com/LitileXueZha/webpack-config-reload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242195338,"owners_count":20087752,"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","configuration","reload","webpack"],"created_at":"2025-03-06T10:40:14.193Z","updated_at":"2026-04-21T13:34:13.706Z","avatar_url":"https://github.com/LitileXueZha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-config-reload\n\n热加载 webpack 配置。修改 webpack 相关配置文件后，自动重启脚本命令，比如 dev-server，比较方便的是在调试 webpack 繁琐的配置时候，省去一遍遍地 `Ctrl+c` 和重复输入命令。\n\n**注意：只支持 `webpack/webpack-dev-server` 两个命令。**\n\n## 安装与使用\n\n使用 npm 安装：\n\n```bash\n$ npm install webpack-config-reload --save-dev\n# 或者全局安装\n$ npm install -g webpack-config-reload\n```\n\n推荐放到 `package.json` 中以执行 npm/yarn 脚本命令：\n\n```json\n{\n    \"scripts\": {\n        \"start\": \"wc-reload webpack-dev-server --config webpack.config.dev.js\",\n        \"build\": \"wc-reload webpack -p\",\n        \"watch\": \"wc-reload npm start\"\n    }\n}\n```\n\n```bash\n# 命令行中执行\n$ npm start\n```\n\n有额外的命令的话，比如：`cross-env`。需要把 `wc-reload` 置于 webpack 命令前面：\n\n```json\n{\n    \"build\": \"cross-env ENV=xxx wc-reload webpack -p\"\n}\n```\n\n全局安装直接在命令行中直接执行：\n\n```bash\n$ wc-reload npm start # 禁止俄罗斯套娃\n$ wc-reload webpack\n$ wc-reload webpack-dev-server --config webpack.config.dev.js\n```\n\n\u003e 未检测到 `webpack/webpack-dev-server` 将直接执行用户命令，不会提供热加载功能。比如：`wc-reload gulp`、`wc-reload eslint` 等\n\n## TODO\n\n+ 补写测试\n+ 貌似新增的文件没有监听到，待验证\n+ 英文版文档（还是算了。。。）\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitilexuezha%2Fwebpack-config-reload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitilexuezha%2Fwebpack-config-reload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitilexuezha%2Fwebpack-config-reload/lists"}