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

PluginReactLynxOptions interface

Options of pluginReactLynx()

Signature:

export interface PluginReactLynxOptions

Properties

Property Modifiers Type Description
compat? Partial<CompatVisitorConfig> & { disableCreateSelectorQueryIncompatibleWarning?: boolean; } | undefined (Optional) The compat option controls compatibilities with ReactLynx2.0.
customCSSInheritanceList? string[] | undefined (Optional) When PluginReactLynxOptions.enableCSSInheritance is enabled, customCSSInheritanceList can control which properties are inheritable, not just the default ones.
debugInfoOutside? boolean (Optional) debugInfoOutside controls whether the debug info is placed outside the template.
defaultDisplayLinear? boolean (Optional) defaultDisplayLinear controls whether the default value of display in CSS is linear.
defineDCE? Partial<DefineDceVisitorConfig> | undefined (Optional) Like define in various bundlers, but this one happens at transform time, and a DCE pass will be performed.
enableAccessibilityElement? boolean (Optional) enableAccessibilityElement set the default value of accessibility-element for all <view /> elements.
enableCSSInheritance? boolean (Optional) enableCSSInheritance enables the default inheritance properties.
enableCSSInvalidation? boolean (Optional) CSS Invalidation refers to the process of determining which elements need to have their styles recalculated when the element is updated.
enableCSSSelector? boolean (Optional) enableCSSSelector controls whether enabling the new CSS implementation.
enableICU? boolean (Optional) enableICU enables the Intl API to be enabled globally.If enabled, please double check the compatibility with Lynx Share Context feature to avoid using shared Intl API from other destroyed card.
enableNewGesture? boolean (Optional) enableNewGesture enables the new gesture system.
enableParallelElement? boolean (Optional) enableParallelElement enables Threaded Element Resolution.
enableRemoveCSSScope? boolean | undefined (Optional) enableRemoveCSSScope controls whether CSS is restrict to use in the component scope.true: All CSS files are treated as global CSS.false: All CSS files are treated as scoped CSS, and only take effect in the component that explicitly imports it.undefined: Only use scoped CSS for CSS Modules, and treat other CSS files as global CSS. Scoped CSS is faster than global CSS, thus you can use CSS Modules to speedy up your CSS if there are performance issues.
experimental_isLazyBundle? boolean (ALPHA) (Optional) Generate standalone lazy bundle.
firstScreenSyncTiming? 'immediately' | 'jsReady' (Optional) This flag controls when MainThread (Lepus) transfers control to Background after the first screenThis flag has two options:"immediately": Transfer immediately"jsReady": Transfer when background (JS Runtime) is readyAfter handing over control, MainThread (Lepus) runtime can no longer respond to data updates, and data updates will be forwarded to background (JS Runtime) and processed __asynchronously__
jsx? Partial<JsxTransformerConfig> | undefined (Optional) The jsx option controls how JSX is transformed.
pipelineSchedulerConfig? number (Optional) Composite configuration representing pipeline scheduling strategies, including PluginReactLynxOptions.enableParallelElement and list batch-rendering. All newly introduced scheduling strategies will be managed by this uint64 configuration.
removeDescendantSelectorScope? boolean (Optional) removeDescendantSelectorScope is used to remove the scope of descendant selectors.
shake? Partial<ShakeVisitorConfig> | undefined (Optional) How main-thread code will be shaken.
targetSdkVersion? string (Optional) targetSdkVersion is used to specify the minimal Lynx SDK version1 that a Lynx template can run on.
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.