'esm' | 'cjs' | 'umd' | 'mf' | 'iife'
'esm'
Specify the output format for the generated JavaScript output files.
For different output formats, Rslib uses the following default value of output.library.type provided by Rspack:
esm
:modern-modulecjs
:commonjs-staticumd
:umdiife
: modern-module with output.iife enabled.See Output Format and Module Federation for more details.
The umd
, mf
and iife
formats only work when bundle is set to true
.