You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: Add version/build identifier to LexicalEditor #6145
It's useful when debugging, and will presumably be useful for devtools, if details of the lexical build are present in the editor. The __DEV__ checks could also use this introspection capability to help people debug the dreaded LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext when there is a bundler configuration issue causing multiple builds of lexical to be present. Possibly something like '0.15.0+dev.cjs' or '0.15.0+prod.esm'.
It could be present on the editor as a static, so it would be accessible with lexicalEditor.constructor.version.
I think the three important things are:
Version
CJS/ESM
prod/dev
It wouldn't prevent all possible problems (e.g. a dependency could bundle the same build of lexical not as an external) but I think it would be helpful and have negligible impact to build size or runtime.
Activity
Set a version on the LexicalEditor constructor for debugging meta#6145