booleanfalseWhether to output JavaScript files in ES modules format.
'web' or 'node'.When building a web application, Rsbuild generates the output in the IIFE format by default.
If you want to output ES Modules instead, set output.module to true:
When output.module is enabled, Rsbuild automatically adds type="module" to the generated <script> tags, meaning html.scriptLoading is set to module.
When building Node.js applications, Rsbuild outputs CommonJS format by default. You can set output.module to true to output ES modules format:
To properly run ESM bundles in Node.js, you can choose either of the following approaches:
type field in package.json to 'module':.mjs:| Version | Changes | 
|---|---|
| v1.5.0 | Added this option | 
| v1.6.0 | Support for target: 'web' |