boolean
false
Used to control whether to inline the bundler's runtime code into HTML.
Modern.js will generate a builder-runtime.js
file in the dist directory, which is the runtime code of webpack or Rspack.
runtimeChunk is a piece of runtime code, which is provided by webpack or Rspack, that contains the necessary module processing logic, such as module loading, module parsing, etc. See Runtime for details.
In the production environment, Modern.js will inline the runtimeChunk file into the HTML file by default instead of writing it to the dist directory. This is done to reduce the number of file requests.
If you don't want the runtimeChunk file to be inlined into the HTML file, you can set disableInlineRuntimeChunk
to true
and a separate builder-runtime.js
file will be generated.
If you don't want to generate a separate runtimeChunk file, but want the runtimeChunk code to be bundled into the page chunk, you can set the config like this: