output.externals

  • Type:
type Externals =
  | string
  | object
  | function
  | RegExp
  | Array<string | object | function | RegExp>;
  • Default: undefined

At build time, prevent some import dependencies from being packed into bundles in your code, and instead fetch them externally at runtime.

INFO

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