Back to Rspack

RuntimeChunkPlugin

website/docs/en/plugins/webpack/runtime-chunk-plugin.mdx

2.0.1527 B
Original Source

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)
js
new rspack.optimize.RuntimeChunkPlugin({
  name: ({ name }) => `runtime~${name}`,
});