output.inlineScripts

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

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

Whether to inline output scripts files (.js files) into HTML with <script> 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.inlineScripts.