output.inlineStyles

  • Type:
type InlineStylesTest =
  | RegExp
  | ((params: { size: number; name: string }) => boolean);

type InlineStyles =
  | boolean
  | InlineStylesTest
  | {
      enable?: boolean | 'auto';
      test: InlineStylesTest;
    };
  • Default: false

Whether to inline output style files (.css files) into HTML with <style> tags.

TIP

When using convention-based routing, you need to set output.splitRouteChunks to false if this option is turned on.

INFO

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