{"id":29018331,"url":"https://github.com/rspack-contrib/rsbuild-plugin-devtools-json","last_synced_at":"2025-06-28T10:07:22.726Z","repository":{"id":300564697,"uuid":"1005580589","full_name":"rspack-contrib/rsbuild-plugin-devtools-json","owner":"rspack-contrib","description":"Rsbuild plugin for generating `com.chrome.devtools.json` on the fly in the dev server.","archived":false,"fork":false,"pushed_at":"2025-06-22T12:31:41.000Z","size":11,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T12:34:51.454Z","etag":null,"topics":["rsbuild","rsbuild-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/rspack-contrib.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T13:05:44.000Z","updated_at":"2025-06-22T12:31:43.000Z","dependencies_parsed_at":"2025-06-22T12:45:43.754Z","dependency_job_id":null,"html_url":"https://github.com/rspack-contrib/rsbuild-plugin-devtools-json","commit_stats":null,"previous_names":["rspack-contrib/rsbuild-plugin-devtools-json"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rspack-contrib/rsbuild-plugin-devtools-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-devtools-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-devtools-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-devtools-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-devtools-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rspack-contrib","download_url":"https://codeload.github.com/rspack-contrib/rsbuild-plugin-devtools-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-devtools-json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261973721,"owners_count":23238585,"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":["rsbuild","rsbuild-plugin"],"created_at":"2025-06-26T00:01:28.531Z","updated_at":"2025-06-26T00:03:24.945Z","avatar_url":"https://github.com/rspack-contrib.png","language":"TypeScript","readme":"# rsbuild-plugin-devtools-json\n\nRsbuild plugin for generating the Chrome DevTools project settings file on-the-fly in the dev server.\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/rsbuild-plugin-devtools-json\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/rsbuild-plugin-devtools-json?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n\u003c/p\u003e\n\nThis enables seamless integration with the new Chrome DevTools features:\n\n1. [DevTools Project Settings (devtools.json)](https://goo.gle/devtools-json-design)\n2. [Automatic Workspace folders](http://goo.gle/devtools-automatic-workspace-folders)\n\n\u003cimg width=\"800\" alt=\"Screenshot 2025-06-22 at 21 45 26\" src=\"https://github.com/user-attachments/assets/daae3e57-f0fc-43c1-b191-8f916bc542ae\" /\u003e\n\n## Installation\n\n```bash\nnpm i -D rsbuild-plugin-devtools-json\n```\n\n## Usage\n\nAdd it to your Rsbuild config:\n\n```js\nimport { defineConfig } from \"@rsbuild/core\";\nimport { pluginDevtoolsJson } from \"rsbuild-plugin-devtools-json\";\n\nexport default defineConfig({\n  plugins: [\n    pluginDevtoolsJson(),\n    // ...\n  ],\n});\n```\n\nWhile the plugin can generate a UUID and save it in Rsbuild cache, you can also specify it in the options like in the following:\n\n```js\npluginDevtoolsJson({\n  uuid: \"6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b\",\n});\n```\n\nYou can also specify a custom root path for the DevTools project settings:\n\n```js\npluginDevtoolsJson({\n  rootPath: \"/path/to/custom/root\",\n});\n```\n\nThis is particularly useful in monorepo setups, where you might want to set the root path to the monorepo root directory, especially when used with [rsbuild-plugin-source-build](https://github.com/rspack-contrib/rsbuild-plugin-source-build). If not provided, the default root path from Rsbuild context will be used.\n\nThe `/.well-known/appspecific/com.chrome.devtools.json` endpoint will serve the project settings as JSON with the following structure:\n\n```json\n{\n  \"workspace\": {\n    \"root\": \"/path/to/project/root\",\n    \"uuid\": \"6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b\"\n  }\n}\n```\n\nHere `root` is the absolute path to your `{projectRoot}` folder, and `uuid` is a random v4 UUID, generated the first time that you start the Rsbuild dev server with the plugin installed (it is henceforth cached in the Rsbuild cache folder).\n\n## Credits\n\nThis plugin is inspired by [vite-plugin-devtools-json](https://github.com/ChromeDevTools/vite-plugin-devtools-json). Both the implementation and documentation have been adapted and referenced from the original Vite plugin.\n\n## License\n\nThe code is under [MIT License](LICENSE).\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Rsbuild Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspack-contrib%2Frsbuild-plugin-devtools-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frspack-contrib%2Frsbuild-plugin-devtools-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspack-contrib%2Frsbuild-plugin-devtools-json/lists"}