After the plugin registration is completed, Rsbuild will automatically parse template files with the .pug extension and compile them using the Pug template engine.
For example, first create a src/index.pug file, and point to that file using html.template:
Example 1: Pass in a configuration object that will be merged with the default options using Object.assign.
pluginPug({ pugOptions:{ doctype:'xml',},});
Example 2: Pass in a configuration function. The default configuration will be passed as the first argument, and you can directly modify the configuration object or return a value as the final result.