Files
loki/scripts
CatoandClaude Fable 5 084f17c054 fix(deploy): link node_modules/shiki into the standalone — the tracer never will (#513)
Second half of the shiki saga (#510 shipped tracing globs that copied
nothing; #512 added serverExternalPackages + a static import, which got the
.pnpm store files traced but still no highlighting in prod).

Hermetic diagnosis (standalone copied OUTSIDE the repo tree, so the dev
node_modules can no longer leak into Node's resolution walk — which is
exactly how the earlier local verification fooled itself): Turbopack's
externalized import of shiki resolves through its own module wrapper, but
bip-kit loads the peer via `new Function("s","return import(s)")` — plain
Node resolution from the server chunk path. Next emits the .pnpm store
entries yet never the top-level node_modules/shiki symlink, so that import
finds nothing and ArticleBody silently degrades to the mono fallback.
With the link created: bp-codeblock-highlighted spans with dual-theme
--shiki-light/--shiki-dark vars. Without: bp-pre fallback. Reproduced both
ways before shipping.

deploy-local.sh (the postbuild that already supplies what the tracer can't
see — static assets, content, node-pty's native binary) now creates the
symlink, version-agnostically, from the store entry it finds. The static
import also becomes load-bearing (bare `import "shiki"` was tree-shaken:
shiki declares sideEffects:false) and asserts at module load, so a missing
peer is a loud failure instead of a quiet styling regression.


Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 22:37:46 +00:00
..
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00