For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/rspeedy/react-rsbuild-plugin.compatvisitorconfig.md.
Rspeedy logo
Rspeedy
  • English
  • Home > @lynx-js/react-rsbuild-plugin > CompatVisitorConfig

    CompatVisitorConfig interface

    The compat option controls compatibilities with legacy ReactLynx.

    Signature:

    export interface CompatVisitorConfig 

    Remarks

    These options should only be used for migrating from ReactLynx2.0 or targeting legacy ReactLynx3 runtimes.

    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

    legacySlot?

    boolean

    (Optional) Compile dynamic children as children + wrapper (the pre-SlotV2 slot codegen: Slot/Children dynamic parts rendered through wrapper elements) instead of the default SlotV2 codegen ($N slot props).

    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

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.