Skip to content

[lexical-extension] Feature: Allow nodes config to be deferred for circular dependency reasons#7930

Merged
etrepum merged 2 commits intofacebook:mainfrom
etrepum:defer-nodes-for-cjs
Oct 18, 2025
Merged

[lexical-extension] Feature: Allow nodes config to be deferred for circular dependency reasons#7930
etrepum merged 2 commits intofacebook:mainfrom
etrepum:defer-nodes-for-cjs

Conversation

@etrepum
Copy link
Copy Markdown
Collaborator

@etrepum etrepum commented Oct 17, 2025

Description

In some bundler configurations, if there is a cyclic dependency between an extension and a node it configures, and they are in separate modules, there can be a runtime error because the bundler can't figure out how to define both the class and the extension.

In ESM with modern bundlers this typically isn't a problem.

See also discord thread

Test plan

New unit tests (and type check)

@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 Oct 17, 2025
@vercel
Copy link
Copy Markdown

vercel bot commented Oct 17, 2025

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

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Oct 17, 2025 5:50pm
lexical-playground Ready Ready Preview Comment Oct 17, 2025 5:50pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@etrepum etrepum added this pull request to the merge queue Oct 18, 2025
Merged via the queue into facebook:main with commit 863e408 Oct 18, 2025
40 of 68 checks passed
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. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants