For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/rspeedy/react-rsbuild-plugin.compatvisitorconfig.md.
Rspeedy logo
Rspeedy
  • 简体中文
  • 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

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。