Skip to content

[codex] Make bundled snippets Next-safe#49

Merged
meekmachine merged 1 commit into
mainfrom
codex/next-safe-snippet-preloader
Jun 12, 2026
Merged

[codex] Make bundled snippets Next-safe#49
meekmachine merged 1 commit into
mainfrom
codex/next-safe-snippet-preloader

Conversation

@meekmachine

Copy link
Copy Markdown
Owner

Summary

  • replace Vite-only import.meta.glob snippet discovery with an explicit package-owned bundled snippet catalog
  • keep the existing snippet preloader API and async loader shape for consumers
  • add package-boundary guidance so consumer apps do not grow local runtime shims for Latticework behavior

Root cause

The published package build exposed Vite-only snippet discovery to consumer bundlers. Next/Turbopack cannot execute that runtime artifact, which caused downstream pages to crash during hydration.

Validation

  • npm run typecheck
  • npm test -- snippetPreloader
  • npm run build
  • scanned src and dist for import.meta.glob / broken snippet loader artifacts

@meekmachine
meekmachine marked this pull request as ready for review June 12, 2026 20:17
@meekmachine
meekmachine merged commit 05b7a6b into main Jun 12, 2026
4 checks passed
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