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/node-template-plugin.md.
close

NodeTemplatePlugin

This plugin is used to bundle Node.js assets, often used with childCompiler.

It applies the 'commonjs' chunk format and configures output.chunkLoading for Node.js runtimes.

By default it sets output.chunkLoading to 'require'. When asyncChunkLoading is enabled, it uses 'async-node' instead.

new rspack.node.NodeTemplatePlugin();

Options

asyncChunkLoading

  • Type: boolean
  • Default: false

Use 'async-node' chunk loading for async chunks instead of 'require'.