developit / developit/preact-markup

ReferenceError: document is not defined. Server Side rendering does not seem to work.

未关闭
#6 2 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
207
派生
27
PR 合并指标
30 天内没有已合并 PR

描述

Hi

I am trying to use the Markup component while rendering server side with preact-render-to-string.
I get the following error: 'ReferenceError: document is not defined'

Could you suggest a work around?

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先,通过 preact-render-to-string 渲染 Markup 组件来复现 ReferenceError,然后检查组件在何处访问 document。在服务端渲染设置中确认该行为;完成的标准是确定一个可行的 workaround,或记录组件当前无法在服务端渲染的原因。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。