ycp424c/dsh-browser-bridge--packages-vite-plugin ↗★ 0
@ycp424c/dsh-browser-bridge-vite
Vite plugin that injects the DSH browser bridge page runtime
AI 分析
核心用途是在前端开发流程中自动接入 DSH 桥接环境。适合使用 Vite 构建项目、并希望智能体能直接读取和操作开发中页面的开发者。
インストール
検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗
ドキュメント
README 全文を読む ↗@ycp424c/dsh-browser-bridge-vite
Vite plugin that injects the DSH browser bridge page runtime. Dev serves
inject by default; production builds inject only with the explicit
bridge.injectInBuild: true switch, and the serialized config keeps the
production default of zero-network dormancy. Library mode and non-HTML SSR
output are never injected.
import { dshBrowserBridge } from '@ycp424c/dsh-browser-bridge-vite'
export default defineConfig({
plugins: [dshBrowserBridge({ dshOrigin: 'http://127.0.0.1:3080' })],
})
dshOriginaccepts only loopback HTTP(S) origins; credentials, remote hosts, and non-HTTP(S) schemes are rejected at config time.- The options schema is strict: secret-shaped keys are rejected because every option ends up in the frontend bundle.
- Serialized configs escape
<, U+2028, and U+2029 so inline module scripts can never be broken out of. - The virtual runtime module wires the official Vite HMR events
(
vite:afterUpdate/dispose) in development.
See the workspace README and INSTALL.md for installation and configuration.