Home > @lynx-js/template-webpack-plugin > EncodeCSSOptions > enableCSSInvalidation
CSS Invalidation refers to the process of determining which elements need to have their styles recalculated when the DOM is updated.
Signature:
When using combinator to determine the styles of various elements (including descendants, adjacent siblings, etc.), it is recommended to enable this feature. Otherwise, only the initial class setting can match the corresponding combinator, and subsequent updates will not recalculate the related styles.
We find that collecting invalidation nodes and updating them is a relatively time-consuming process. If there is no such usage and better style matching performance is needed, this feature can be selectively disabled.