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

Home > @lynx-js/template-webpack-plugin > LynxTemplatePluginOptions

LynxTemplatePluginOptions interface

The options for LynxTemplatePlugin

Signature:

export interface LynxTemplatePluginOptions 

Properties

Property

Modifiers

Type

Description

chunks?

'all' | string[]

(Optional) List all entries which should be injected

cssPlugins

CSS.Plugin[]

plugins passed to parser

customCSSInheritanceList

string[] | undefined

When is enabled, customCSSInheritanceList can control which properties are inheritable, not just the default ones.

debugInfoOutside

boolean

debugInfoOutside controls whether the debug info is placed outside the template.

defaultDisplayLinear

boolean

defaultDisplayLinear controls whether the default value of display in CSS is linear.

If defaultDisplayLinear === false, the default display would be flex instead of linear.

defaultOverflowVisible?

boolean

(Optional) When enabled, the default overflow CSS property for views and components will be 'visible'. Otherwise, it will be 'hidden'.

dsl?

'tt' | 'react' | 'react_nodiff'

(Optional) Declare the current dsl to the encoder.

enableA11y

boolean

Use Android View level APIs and system implementations.

enableAccessibilityElement

boolean

enableAccessibilityElement set the default value of accessibility-element for all <view /> elements.

enableCSSInheritance

boolean

enableCSSInheritance enables the default inheritance properties.

enableCSSInvalidation

boolean

CSS Invalidation refers to the process of determining which elements need to have their styles recalculated when the DOM is updated.

enableCSSSelector

boolean

enableCSSSelector controls whether enabling the new CSS implementation.

enableNewGesture

boolean

enableNewGesture enables the new gesture system.

enableRemoveCSSScope

boolean

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.

excludeChunks?

string[]

(Optional) List all entries which should not be injected

experimental_isLazyBundle?

boolean

(ALPHA) (Optional) Generate standalone lazy bundle.

filename?

string | ((entryName: string) => string)

(Optional) The file to write the template to. Supports subdirectories eg: assets/template.js. [name] will be replaced by the entry name. Supports a function to generate the name.

intermediate?

string

(Optional) The output directory of the intermediate files.

lazyBundleFilename?

string

(Optional) The filename of the lazy bundle.

removeDescendantSelectorScope

boolean

removeDescendantSelectorScope is used to remove the scope of descendant selectors.

targetSdkVersion

string

targetSdkVersion is used to specify the minimal Lynx Engine version that a App bundle can run on.