-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Which package(s) are affected?
React (@lit-labs/react)
Description
__forwardedRef matches our our Terser property name mangling config, so it's being minified. This is noticeable because the prod tests trigger a React warning that _$Gl isn't a valid attribute name, which is caused by us adding __forwardedRef to props here: https://github.com/lit/lit/blob/main/packages/labs/react/src/create-component.ts#L250
This should mean that user refs are broken, but we have a ref test, so we need to check our coverage here.
We can prevent the mangling either by adding '__forwardedRef' to our global reserved property names, or by setting Terser's keep_quoted option to true.
Reproduction
Run the react tests
Workaround
none
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
all
Browser/OS/Node environment
all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done