For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/rspeedy/rspeedy.source.assetsinclude.md.
Rspeedy logo
Rspeedy
  • English
  • Home > @lynx-js/rspeedy > Source > assetsInclude

    Source.assetsInclude property

    Include additional files that should be treated as static assets.

    Signature:

    assetsInclude?: Rspack.RuleSetCondition | undefined;

    Default Value

    undefined

    Remarks

    By default, Rsbuild treats common image, font, audio, and video files as static assets. Through the source.assetsInclude config, you can specify additional file types that should be treated as static assets. These added static assets are processed using the same rules as the built-in supported static assets。

    The usage of source.assetsInclude is consistent with Condition in Rspack, which supports passing in strings, regular expressions, arrays of conditions, or logical conditions to match the module path or assets.

    Example

    import { defineConfig } from '@lynx-js/rspeedy'
    export default defineConfig({
      source: {
        assetsInclude: /\.json5$/,
      },
    })
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.