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

PluginReactLynxOptions.enableRemoveCSSScope property

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.

Signature:

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