output.convertToRem
- Type:
boolean | object - Default:
false
By setting output.convertToRem, Modern.js can do the following things:
- Convert px to rem in CSS.
- Insert runtime code into the HTML template to set the fontSize of the root element.
Boolean Type
If output.convertToRem is set to true, Rem processing capability will be turned on.
At this point, the rem configuration defaults as follows:
Object Type
When the value of output.convertToRem is object type, Modern.js will perform Rem processing based on the current configuration.
options:
Example
For detailed usage, please refer to rsbuild-plugin-rem.