Repository navigation
[lexical-playground] Bug Fix: Fix the importmap of the /esm/ proof of concept - #8655
Merged
etrepum merged 3 commits intoJun 8, 2026
Merged
Conversation
The ESM playground example loaded its dependencies via an importmap that points at each package's fork module (e.g. ./dist/Lexical.mjs). After the build switched to fork modules that re-export from a sibling bundle, the fork module imports ./Lexical.dev.mjs (or .prod.mjs), but viteCopyEsm only copied the fork file itself, so every sibling-bundle import 404'd in the deployed build. Dev worked because Vite resolves the bare imports through its source aliases and never uses the importmap. Copy every .mjs in each referenced package's dist so the fork module's relative import resolves, and add the now-transitively-required @lexical/extension entry to the importmap.
Skip the fork-module indirection entirely: the importmap now resolves each package to its self-contained `.dev` bundle (e.g. ./dist/Lexical.dev.mjs) instead of the fork module that re-exports from it. The bundles only import bare specifiers, which the importmap resolves to their sibling bundles, so viteCopyEsm copies exactly the named file with no extra variants.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
marked this pull request as ready for review
June 8, 2026 18:25
etrepum
requested review from
acywatson,
fantactuka,
ivailop7,
potatowagon and
zurfyx
as code owners
June 8, 2026 18:25
zurfyx
approved these changes
Jun 8, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix the importmap of the playground /esm/ proof of concept
Test plan
Before
404s for dependencies when loading https://playground.lexical.dev/esm/ which causes the state view to not work
After
All dependencies are loaded at https://lexical-playground-git-fork-etrepum-claude-1d060c-fbopensource.vercel.app/esm/