For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /plugins/webpack/runtime-chunk-plugin.md.
close

RuntimeChunkPlugin

Used to control how the runtime chunk is generated, it is used by optimization.runtimeChunk under the hood.

Options

name

Used to configure the name of the runtime chunk; it can be a string or a function that returns a string, where the function parameter is the name of the entry.

  • Type: string | ((entrypoint: { name: string }) => string)
new rspack.optimize.RuntimeChunkPlugin({
  name: ({ name }) => `runtime~${name}`,
});