ycp424c/dsh-browser-bridge--packages-vite-plugin0

@ycp424c/dsh-browser-bridge-vite

Vite plugin that injects the DSH browser bridge page runtime

AI 분석

核心用途是在前端开发流程中自动接入 DSH 桥接环境。适合使用 Vite 构建项目、并希望智能体能直接读取和操作开发中页面的开发者。

패키지
@ycp424c/dsh-browser-bridge-vite
버전
0.1.0
최근 업데이트
2026. 8. 14.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 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' })],
})
  • dshOrigin accepts 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.