{"_id":"@dom-xray/rspack","_rev":"5-400fed8d17d6d16f799dd58805bb8f6a","name":"@dom-xray/rspack","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@dom-xray/rspack","version":"1.0.0","_id":"@dom-xray/rspack@1.0.0","maintainers":[{"name":"littlefox9527","email":"727961386@qq.com"}],"dist":{"shasum":"5604b7b19c021c8ad3ff7e226273287cd224ffd5","tarball":"https://registry.npmjs.org/@dom-xray/rspack/-/rspack-1.0.0.tgz","fileCount":6,"integrity":"sha512-xJj0guZKvXVAcTKAfkGqZzVTUftalePBgaLWpiZ/PF4E8lCZA7ldzhT9jjz3Sn5eTBdVzi3fc0omfJjiFd2XJw==","signatures":[{"sig":"MEUCIQCod/Sk2JCS1AgYifOq85I/ckZ1yie6KpbJziELd34ZTAIgUOFlizT1BvO35V7j8EOguIx5ck47DnQaXWmORpCVGos=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16518},"main":"./dist/index.js","type":"module","_from":"file:dom-xray-rspack-1.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc -w","build":"tsc","check-types":"tsc --noEmit"},"_npmUser":{"name":"littlefox9527","email":"727961386@qq.com"},"_resolved":"/private/var/folders/p8/9s5yfvs50ss61k91qdw4t0jr0000gn/T/92d8a0f6b896570674718ff2e023781e/dom-xray-rspack-1.0.0.tgz","_integrity":"sha512-xJj0guZKvXVAcTKAfkGqZzVTUftalePBgaLWpiZ/PF4E8lCZA7ldzhT9jjz3Sn5eTBdVzi3fc0omfJjiFd2XJw==","_npmVersion":"10.9.4","description":"Rspack plugin for DOM XRay","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@dom-xray/core":"1.0.0","@dom-xray/overlay-ui":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^22.15.15","@rspack/core":"^2.0.5"},"peerDependencies":{"@rspack/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rspack_1.0.0_1780915454920_0.8304595468838796","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dom-xray/rspack","version":"1.0.1","keywords":["dom-xray","rspack","plugin","devtools","source-code-locator","source-code-navigation","code-jump","ai-agent"],"_id":"@dom-xray/rspack@1.0.1","maintainers":[{"name":"littlefox9527","email":"727961386@qq.com"}],"homepage":"https://github.com/ALittleFox/dom-xray#readme","bugs":{"url":"https://github.com/ALittleFox/dom-xray/issues"},"dist":{"shasum":"ff8000d823de0b49ee5210cee72ee07d8f76704e","tarball":"https://registry.npmjs.org/@dom-xray/rspack/-/rspack-1.0.1.tgz","fileCount":7,"integrity":"sha512-22qzL5A7Km3QeEOgs4/0LcOVJvhk7eJhVVZXrSWGkPwEyXWEZi3HVsyFzphpy9xMf4TKsLv4ne/RP92zUq/KbQ==","signatures":[{"sig":"MEUCIQCtdFitnzCcqzu/yI0so/e+9RkQ1q8f7z/LNwjK3yhwxwIgHEeMZZC6nYigaKOewGJzPPywObfSxZipTFpa53bUJcU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18315},"main":"./dist/index.js","type":"module","_from":"file:dom-xray-rspack-1.0.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc -w","build":"tsc","check-types":"tsc --noEmit"},"_npmUser":{"name":"littlefox9527","email":"727961386@qq.com"},"_resolved":"/tmp/a80a16ceb5d5ecf6651f7254323fd8df/dom-xray-rspack-1.0.1.tgz","_integrity":"sha512-22qzL5A7Km3QeEOgs4/0LcOVJvhk7eJhVVZXrSWGkPwEyXWEZi3HVsyFzphpy9xMf4TKsLv4ne/RP92zUq/KbQ==","repository":{"url":"git+https://github.com/ALittleFox/dom-xray.git","type":"git","directory":"packages/rspack"},"_npmVersion":"10.9.8","description":"Rspack plugin for DOM XRay","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@dom-xray/core":"1.0.1","@dom-xray/overlay-ui":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^22.15.15","@rspack/core":"^2.0.5"},"peerDependencies":{"@rspack/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rspack_1.0.1_1780921219361_0.4119089367377735","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@dom-xray/rspack","version":"1.0.2","keywords":["dom-xray","rspack","plugin","devtools","source-code-locator","source-code-navigation","code-jump","ai-agent"],"_id":"@dom-xray/rspack@1.0.2","maintainers":[{"name":"littlefox9527","email":"727961386@qq.com"}],"homepage":"https://github.com/ALittleFox/dom-xray#readme","bugs":{"url":"https://github.com/ALittleFox/dom-xray/issues"},"dist":{"shasum":"42ad849d277c38d647e47ab060d0f8734f4cfdff","tarball":"https://registry.npmjs.org/@dom-xray/rspack/-/rspack-1.0.2.tgz","fileCount":7,"integrity":"sha512-w/O39Ck4N8Z9NPxm6vG3O6XVyJlMoy1JDwK7XDejTdiqjgbMO9RsTKHDW4NaHYGPvUJh1+l1bzYiUlHkfYtX5g==","signatures":[{"sig":"MEUCIQCLIQc+SnHYzla1WuelBcn+YQRqmXaLT/dwUn7LPUIXfQIgGz/iXJ40v2YGJ9GHPbszLOG474KdXambqp8Tk1XAKYU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18313},"main":"./dist/index.js","type":"module","_from":"file:dom-xray-rspack-1.0.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc -w","build":"tsc","check-types":"tsc --noEmit"},"_npmUser":{"name":"littlefox9527","email":"727961386@qq.com"},"_resolved":"/tmp/dbdd7137416e91692cd49978bf2cae46/dom-xray-rspack-1.0.2.tgz","_integrity":"sha512-w/O39Ck4N8Z9NPxm6vG3O6XVyJlMoy1JDwK7XDejTdiqjgbMO9RsTKHDW4NaHYGPvUJh1+l1bzYiUlHkfYtX5g==","repository":{"url":"git+https://github.com/ALittleFox/dom-xray.git","type":"git","directory":"packages/rspack"},"_npmVersion":"11.13.0","description":"Rspack plugin for DOM XRay","directories":{},"_nodeVersion":"24.16.0","dependencies":{"@dom-xray/core":"1.0.2","@dom-xray/overlay-ui":"1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^24.0.0","@rspack/core":"^2.0.5"},"peerDependencies":{"@rspack/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rspack_1.0.2_1780937461643_0.40662567959243257","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@dom-xray/rspack","version":"1.0.3","keywords":["dom-xray","rspack","plugin","devtools","source-code-locator","source-code-navigation","code-jump","ai-agent"],"_id":"@dom-xray/rspack@1.0.3","maintainers":[{"name":"littlefox9527","email":"727961386@qq.com"}],"homepage":"https://github.com/ALittleFox/dom-xray#readme","bugs":{"url":"https://github.com/ALittleFox/dom-xray/issues"},"dist":{"shasum":"77bf12b57f5628e3fcd001476a9cc59e9ddcaf91","tarball":"https://registry.npmjs.org/@dom-xray/rspack/-/rspack-1.0.3.tgz","fileCount":7,"integrity":"sha512-t/AEgpfYawv1JpPBPPkvmqX/f1StCvu1A+EgiQWjTJ7oMEZHJDZZ/Se67zNe7kfCJEdCm6PVHhuJdqIPOMKthg==","signatures":[{"sig":"MEYCIQDKRpJd3QHulDfMln3cVYZz+8PwPH6rvZXcR8f4oyr2IwIhAIPQ6AXfwTi5NXkM/yldkXY95QNPq3kJg+6rlx6uubpm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18349},"main":"./dist/index.js","type":"module","_from":"file:dom-xray-rspack-1.0.3.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"dev":"tsc -w","build":"tsc","check-types":"tsc --noEmit"},"_npmUser":{"name":"littlefox9527","email":"727961386@qq.com"},"_resolved":"/tmp/1c955a89ff7258f7e214e5f2ee00fb99/dom-xray-rspack-1.0.3.tgz","_integrity":"sha512-t/AEgpfYawv1JpPBPPkvmqX/f1StCvu1A+EgiQWjTJ7oMEZHJDZZ/Se67zNe7kfCJEdCm6PVHhuJdqIPOMKthg==","repository":{"url":"git+https://github.com/ALittleFox/dom-xray.git","type":"git","directory":"packages/rspack"},"_npmVersion":"11.13.0","description":"Rspack plugin for DOM XRay","directories":{},"_nodeVersion":"24.16.0","dependencies":{"@dom-xray/core":"2.0.0","@dom-xray/overlay-ui":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^24.0.0","@rspack/core":"^2.0.5"},"peerDependencies":{"@rspack/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rspack_1.0.3_1781156567726_0.9793273479751339","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@dom-xray/rspack","version":"2.0.0","description":"Rspack plugin for DOM XRay","repository":{"type":"git","url":"git+https://github.com/ALittleFox/dom-xray.git","directory":"packages/rspack"},"keywords":["dom-xray","rspack","plugin","devtools","source-code-locator","source-code-navigation","code-jump","ai-agent"],"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"peerDependencies":{"@rspack/core":"^2.0.0"},"devDependencies":{"@rspack/core":"^2.0.5","typescript":"^6.0.3","@types/node":"^24.0.0"},"dependencies":{"@dom-xray/core":"2.0.1","@dom-xray/overlay-ui":"2.0.1"},"scripts":{"build":"tsc","dev":"tsc -w","check-types":"tsc --noEmit"},"_id":"@dom-xray/rspack@2.0.0","bugs":{"url":"https://github.com/ALittleFox/dom-xray/issues"},"homepage":"https://github.com/ALittleFox/dom-xray#readme","_integrity":"sha512-c7gsUE+R42e8AylKl0wkxSBAf2iIiGln7uSx4qjhWYg+En+qzWXiqdxz1OrT5Z5nC0m1qLHfeKgsHQIAUWwcZA==","_resolved":"/tmp/7f04c648d5293cc3a49fcb1d34c1e452/dom-xray-rspack-2.0.0.tgz","_from":"file:dom-xray-rspack-2.0.0.tgz","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-c7gsUE+R42e8AylKl0wkxSBAf2iIiGln7uSx4qjhWYg+En+qzWXiqdxz1OrT5Z5nC0m1qLHfeKgsHQIAUWwcZA==","shasum":"3883309f1917e27749c32546d5f2c3a1af08d581","tarball":"https://registry.npmjs.org/@dom-xray/rspack/-/rspack-2.0.0.tgz","fileCount":7,"unpackedSize":18349,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDbfsY4oRuZck2uZ5+koOlPV/Nmj6whS/qXyOC86FsZZQIgW2E1OVxk9B9OPJ3Bcs5H1pQHIhaLVhxcdBMHp3lUuBM="}]},"_npmUser":{"name":"littlefox9527","email":"727961386@qq.com"},"directories":{},"maintainers":[{"name":"littlefox9527","email":"727961386@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rspack_2.0.0_1781256448814_0.0984902727354946"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-08T10:44:14.777Z","modified":"2026-06-12T09:27:29.118Z","1.0.0":"2026-06-08T10:44:15.085Z","1.0.1":"2026-06-08T12:20:19.562Z","1.0.2":"2026-06-08T16:51:01.809Z","1.0.3":"2026-06-11T05:42:47.850Z","2.0.0":"2026-06-12T09:27:28.960Z"},"bugs":{"url":"https://github.com/ALittleFox/dom-xray/issues"},"homepage":"https://github.com/ALittleFox/dom-xray#readme","keywords":["dom-xray","rspack","plugin","devtools","source-code-locator","source-code-navigation","code-jump","ai-agent"],"repository":{"type":"git","url":"git+https://github.com/ALittleFox/dom-xray.git","directory":"packages/rspack"},"description":"Rspack plugin for DOM XRay","maintainers":[{"name":"littlefox9527","email":"727961386@qq.com"}],"readme":"# @dom-xray/rspack\n\nDOM XRay 的 Rspack 2+ 插件适配器。在编译阶段向 JSX/TSX、Vue SFC、Svelte 文件注入 `data-source` 属性，兼容 Rspack dev-server v2 的 `middlewares` API。\n\n## 安装\n\n```bash\nnpm i -D @dom-xray/rspack\n```\n\n## 用法\n\n### rspack.config.js\n\n```js\nimport { DomXrayRspackPlugin } from \"@dom-xray/rspack\";\n\nexport default {\n  plugins: [\n    new DomXrayRspackPlugin({\n      editor: \"zed\",\n    }),\n  ],\n};\n```\n\n## 配置\n\n```ts\ninterface DomXrayRspackOptions {\n  title?: string;\n  hotkey?: { mac?: string; win?: string };\n  editor?: \"vscode\" | \"cursor\" | \"zed\" | \"trae\";\n  clickSelector?: string | false;\n  targetFilePatterns?: string[];\n  onSubmit?: \"return\" | string | ((data: SubmitPayload) => void | Promise<void>);\n  agentConfig?: AgentConfig;\n}\n```\n\n完整配置说明见根目录 [README.md](https://github.com/ALittleFox/dom-xray/blob/main/README.zh-CN.md)。\n\n## 功能特性\n\n- **开发模式专用**：非 development 模式会自动报错\n- **自动注入客户端 entry**：将 `@dom-xray/overlay-ui/dist/client.js` 注入到 Rspack entry 中\n- **DefinePlugin 注入全局常量**：`__DOM_XRAY_CONFIG__`、`__DOM_XRAY_API__`\n- **devServer middlewares 自动挂载**：兼容 Rspack dev-server v2 的 `middlewares` 数组形式\n- **源码收集**：通过 `compilation.hooks.afterOptimizeModules` 收集 `.js/.jsx/.ts/.tsx/.vue/.svelte` 原始源码\n","readmeFilename":"README.zh-CN.md"}