tools.cssExtract

  • Type: Object | Function
  • 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 / mini-css-extract-plugin can be modified through tools.cssExtract.

For detailed usage, please refer to Rsbuild - tools.cssExtract.