@tripo3d/lens / nuxt/module / default
Variable: default
ts
const default: NuxtModule<ModuleOptions>;Defined in: src/nuxt/module.ts:44
Nuxt 适配器:把 @tripo3d/lens 在 Nuxt 工程里零手工接线地跑起来。
- 客户端:注入 Nuxt plugin(
runtime/plugin.client)——new TripoLens({ app }).init()+app:suspense:resolve触发markHydration。 - 服务端:注入 Nitro plugin(
runtime/nitro)—— 方案 D:per-request 经 h3event.context挂采集器 (不依赖 ALS),出站请求 ofetch 拦截、Nitroerrorhook 收集,render:html注入两独立容器。
client: false → 跳过客户端实例,只保留服务端 SSR 采集;客户端实例由用户自己 new TripoLens 并 markHydration() 读取容器。用于「自带实例 + 仅借适配器搬运 SSR」,避免双实例重复上报 / 容器争用。