For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/rspeedy/react-rsbuild-plugin.pluginreactlynxoptions.enableremovecssscope.md.
Rspeedy logo
Rspeedy
  • 简体中文
  • 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;

    Default Value

    true

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