Skip to content

docs: ホストは外した engine の依存も束ねる (ADR-0009 に追記) - #14

Merged
t1nyb0x merged 1 commit into
developfrom
docs/host-prebundle
Oct 6, 2026
Merged

t1nyb0x merged 1 commit into
developfrom
docs/host-prebundle

Conversation

@t1nyb0x

@t1nyb0x t1nyb0x commented Oct 6, 2026

Copy link
Copy Markdown
Member

lumorphia/prismtone で公開パッケージ (1.0.0) に切り替えたあと、dev サーバーで描画が立ち上がらなかった (「WebGL が無効です」、lumorphia/prismtone#370)。

原因は、optimizeDeps.exclude で engine を外すと、その中の import を Vite の依存の最適化が辿らないこと。そのため pixi.js がそのまま配られ、CommonJS の eventemitter3 を ESM として読めなかった。本番ビルドでは起きないので、本番ビルドの E2E では見つからない。

ADR-0009 (ホストに求めること) に、「@lumorphia/editor-engine > 依存」の形で optimizeDeps.include に足すことを追記した。Accepted なので本文は書き換えず、追記にした。このリポジトリの apps/web は engine を workspace から使う (node_modules の外にあり、最適化が辿る) ので、この問題は起きない。

🤖 Generated with Claude Code

lumorphia/prismtone で公開パッケージに切り替えたあと、dev で描画が立ち上がらなかった
(lumorphia/prismtone#370)。engine を optimizeDeps.exclude で外すと、その中の import を
Vite が辿らず、pixi.js がそのまま配られて CommonJS の eventemitter3 を読めない。
ホストは「@lumorphia/editor-engine > 依存」の形で include に足す。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant