Skip to content

[lexical-playground] Bug Fix: Fix the importmap of the /esm/ proof of concept - #8655

Merged
etrepum merged 3 commits into
meta:mainfrom
etrepum:claude/esm-example-playground-404-rz6d2q
Jun 8, 2026
Merged

etrepum merged 3 commits into
meta:mainfrom
etrepum:claude/esm-example-playground-404-rz6d2q

Conversation

@etrepum

@etrepum etrepum commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

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/

claude added 2 commits June 8, 2026 16:54
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.
@vercel

vercel Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Jun 8, 2026 6:24pm
lexical-playground Ready Ready Preview, Comment Jun 8, 2026 6:24pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 8, 2026
@etrepum etrepum changed the title Claude/esm example playground 404 rz6d2q [lexical-playground] Bug Fix: Fix the importmap of the /esm/ proof of concept Jun 8, 2026
@etrepum
etrepum marked this pull request as ready for review June 8, 2026 18:25
@etrepum
etrepum added this pull request to the merge queue Jun 8, 2026
Merged via the queue into meta:main with commit eec85d5 Jun 8, 2026
76 of 77 checks passed
@etrepum
etrepum deleted the claude/esm-example-playground-404-rz6d2q branch June 8, 2026 22:22
@etrepum etrepum mentioned this pull request Jun 25, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical — 7e3c3c92 Deployed Jun 8, 2026 by vercel[bot]
Preview – lexical-playground — 7e3c3c92 Deployed Jun 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants