Home > @lynx-js/react-rsbuild-plugin > CompatVisitorConfig
The compat option controls compatibilities with ReactLynx2.0.
Signature:
These options should only be used for migrating from ReactLynx2.0.
| Property | Modifiers | Type | Description |
|---|---|---|---|
| addComponentElement | boolean | AddComponentElementConfig | Controls whether to add wrapper elements for components | |
| additionalComponentAttributes | Array<string> | Specifies additional component attributes list, these attributes will be passed to the wrapped <view> instead of the component. | |
| componentsPkg | Array<string> | Specifies the list of component package names that need compatibility processing | |
| darkMode? | boolean | DarkModeConfig | (Optional) | |
| disableDeprecatedWarning | boolean | Whether to disable deprecated warnings | |
| newRuntimePkg | string | Specifies the new runtime package name | |
| oldRuntimePkg | Array<string> | Specifies the list of old runtime package names that need compatibility processing | |
| removeComponentAttrRegex? | string | (Optional) Regular expression used to remove component attributes | |
| simplifyCtorLikeReactLynx2 | boolean | Whether to simplify constructor calls like ReactLynx 2 |