SwcCssMinimizerRspackPlugin

Added in v0.3.3Rspack only

This plugin can be used to compress CSS assets. See optimization.minimizer.

module.exports = {
  // ...
  optimization: {
    minimizer: [new rspack.SwcCssMinimizerRspackPlugin(options)],
  },
};
  • options

    • Type:
    type SwcCssMinimizerRspackPluginOptions = {
      test?: MinifyConditions;
      exclude?: MinifyConditions;
      include?: MinifyConditions;
    };
    
    type MinifyCondition = string | RegExp;
    type MinifyConditions = MinifyCondition | MinifyCondition[];