Object | Function | undefined
When building for production, Modern.js will minimize the CSS code through css-minimizer-webpack-plugin. The config of css-minimizer-webpack-plugin can be modified via tools.minifyCss
.
When tools.minifyCss
is Object
type, it will be merged with the default config via Object.assign
.
For example, modify the preset
config of cssnano:
When tools.minifyCss
is Function
type, the default config is passed in as the first parameter, the config object can be modified directly, or a value can be returned as the final result.