For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /configure/app/tools/css-extract.md.

tools.cssExtract

  • Type:
type CSSExtractOptions = {
  pluginOptions?: Rspack.CssExtractRspackPluginOptions;
  loaderOptions?: Rspack.CssExtractRspackLoaderOptions;
};
  • Default:
const defaultOptions = {
  // The loader options
  loaderOptions: {},
  // The plugin options
  pluginOptions: {
    // The default value of cssPath is `static/css`
    // while the default value of cssFilename is `[name].[contenthash:8].css`
    filename: `${cssPath}/${cssFilename}`,
    chunkFilename: `${cssPath}/async/${cssFilename}`,
    ignoreOrder: true,
  },
};

The config of CssExtractRspackPlugin can be modified through tools.cssExtract.

Info

The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to Rsbuild - tools.cssExtract.