{"id":29969382,"url":"https://github.com/lostpebble/vite-plugin-watch-node-modules","last_synced_at":"2025-08-04T04:06:37.727Z","repository":{"id":292226919,"uuid":"980208915","full_name":"lostpebble/vite-plugin-watch-node-modules","owner":"lostpebble","description":"A plugin to force Vite to watch for changes in selected packages inside the node_modules folder","archived":false,"fork":false,"pushed_at":"2025-05-09T14:48:44.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T05:17:34.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/lostpebble.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-08T18:42:26.000Z","updated_at":"2025-07-21T14:53:41.000Z","dependencies_parsed_at":"2025-05-08T19:45:56.223Z","dependency_job_id":"fd3dd95e-0f24-4065-931a-0dd64a398849","html_url":"https://github.com/lostpebble/vite-plugin-watch-node-modules","commit_stats":null,"previous_names":["lostpebble/vite-plugin-watch-node-modules"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lostpebble/vite-plugin-watch-node-modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostpebble%2Fvite-plugin-watch-node-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostpebble%2Fvite-plugin-watch-node-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostpebble%2Fvite-plugin-watch-node-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostpebble%2Fvite-plugin-watch-node-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lostpebble","download_url":"https://codeload.github.com/lostpebble/vite-plugin-watch-node-modules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostpebble%2Fvite-plugin-watch-node-modules/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268648001,"owners_count":24284175,"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-08-04T02:00:09.867Z","response_time":79,"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":"2025-08-04T04:06:33.270Z","updated_at":"2025-08-04T04:06:37.711Z","avatar_url":"https://github.com/lostpebble.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vite-plugin-watch-node-modules\n\nOn NPM: https://www.npmjs.com/package/vite-plugin-watch-node-modules\n\nA plugin to watch selected packages inside `node_modules` folders in your repo for changes, and trigger a reload in Vite.\n\n# Features\n\n* Hot-reload any file changes to packages inside any `node_modules` in your repo that match your provided `modules[]` array. \n\n## Getting Started\n\nInstall the plugin:\n\n```\nbun i -d vite-plugin-watch-node-modules\n```\n\nThen add the plugin to your Vite config:\n\n```ts\nimport { watchNodeModules } from \"vite-plugin-watch-node-modules\";\n\n// https://vite.dev/config/\nexport default defineConfig({\n  plugins: [\n    // ...\n    watchNodeModules([\"@my-module/great\", \"my-dev-module\"], {\n      cwd: path.join(process.cwd(), \"../../../\"),\n    }),\n  ],\n});\n```\n\nIn this example, we are watching for changes to modules matching `@my-module/great` and `my-dev-module`- but our actual Vite project is\n3 folders deep in the monorepo, so we add the `cwd` option to get make sure we search for any matching modules from the root of the repo.\n\n## Options\n\nThe options interface is:\n\n```\ninterface IWatchNodeModulesOptions {\n  cwd?: string;\n}\n```\n\nYou can set a different `cwd` if you want to watch a different directory than the current working directory.\nThis is useful if you are using a monorepo setup and want to watch packages in the root of the monorepo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostpebble%2Fvite-plugin-watch-node-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flostpebble%2Fvite-plugin-watch-node-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostpebble%2Fvite-plugin-watch-node-modules/lists"}