This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/react-rsbuild-plugin > CompatVisitorConfig

CompatVisitorConfig interface

The compat option controls compatibilities with ReactLynx2.0.

Signature:

export interface CompatVisitorConfig 

Remarks

These options should only be used for migrating from ReactLynx2.0.

Properties

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