Importing and Using `Markdown` from `@ciabi/[email protected]` causes HTTP 500 on Cloudflare Worker

オープン
#1 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@wheatwhole がすでに取り組んでいます。

2026年9月22日 から。

評価

この issue はまだ評価されていません。

説明

bug

Reproduction: use @sveltejs/adapter-cloudflare, render <Markdown source="## Hello" /> on a route, build, and serve it with wrangler dev.

[500] GET /
TypeError: Cannot read properties of undefined (reading 'bind')
    at node_modules/isomorphic-dompurify/dist/browser.mjs:4:35
    at .svelte-kit/output/server/entries/pages/_page.svelte.js

The published Markdown.svelte imports isomorphic-dompurify at module scope. Its browser entry calls DOMPurify.sanitize.bind(DOMPurify) during import, but sanitize is undefined in this Worker runtime. The route fails before Markdown renders.

Expected: Markdown can be imported and safely rendered during Cloudflare Workers SSR.

Environment: loaf-web 0.2.0, isomorphic-dompurify 3.19.0, SvelteKit with adapter-cloudflare, wrangler dev.

Replacing Markdown with ordinary Svelte markup avoided the 500 in the consuming app.

主要言語
Svelte
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ciabidev/loafkit のほかの issue

ciabidev/loafkit の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。