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

EncodeCSSOptions interface

The options for encoding CSS.

Signature:

export interface EncodeCSSOptions 

Properties

PropertyModifiersTypeDescription
enableCSSInvalidationbooleanCSS Invalidation refers to the process of determining which elements need to have their styles recalculated when the DOM is updated.
enableCSSSelectorbooleanenableCSSSelector controls whether enabling the new CSS implementation.
enableRemoveCSSScopeboolean

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.

targetSdkVersionstring

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.