Skip to content
PluginStats

@ohos-ports/css-minimizer-webpack-plugin weekly downloads statistics

By ohos-ports (2 listings) · npm · Webpack plugins

CSS minimizer (minifier) plugin for Webpack

View on npm Fresh · Nov 6, 2026

@ohos-ports/css-minimizer-webpack-plugin has 226 recorded weekly downloads on npm, ranking #1777 of 2,865 tracked listings.

Weekly downloads
226
Official API · Nov 4, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1777
Among tracked npm listings

About @ohos-ports/css-minimizer-webpack-plugin

<div align="center"> <a href="https://github.com/webpack/webpack"> <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg"> </a> </div>

[![npm][npm]][npm-url] [![node][node]][node-url] [![tests][tests]][tests-url] [![cover][cover]][cover-url] [![discussion][discussion]][discussion-url] [![size][size]][size-url]

css-minimizer-webpack-plugin

This plugin uses cssnano to optimize and minify your CSS.

It serves as a more accurate alternative to optimize-css-assets-webpack-plugin, with better support for source maps, assets with query strings, caching, and parallel processing.

Getting Started

To begin, you'll need to install css-minimizer-webpack-plugin:

npm install css-minimizer-webpack-plugin --save-dev

or

yarn add -D css-minimizer-webpack-plugin

or

pnpm add -D css-minimizer-webpack-plugin

Then add the plugin to your webpack configuration. For example:

webpack.config.js

const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

module.exports = {
  module: {
    rules: [
      {
        test: /\.s?css$/,
        use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"],
      },
    ],
  },
  optimization: {
    minimizer: [
      // For webpack v5, you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line // `...`,
      new CssMinimizerPlugin(),
    ],
  },
  plugins: [new MiniCssExtractPlugin()],
};

[!NOTE]

This enables CSS optimization only in production mode by default.

To enable it in development mode as well, set the optimization.minimize option to true:

webpack.config.js

// [...]
module.exports = {
  optimization: {
    // [...]
    minimize: true,
  },
};

Finally, run Webpack using your preferred method.

Note about source maps

This plugin works only with source-map, inline-source-map, hidden-source-map and nosources-source-map values for the devtool option.

Why? Because CSS support only these source map types.

The plugin respects the devtool setting and uses the SourceMapDevToolPlugin internally.

Using a supported devtool value enables source map generation.

Enabling the columns option in SourceMapDevToolPlugin also allows source map generation.

Use source maps to map error message locations to their original modules (note that this may slow down compilation).

If you use your own minify function please refer to the minify section for correct handling of source maps.

Options

NameTypeDefaultDescription
testString|RegExp|Array<String|RegExp>/\.css(\?.*)?$/iTest to match files against.
includeString|RegExp|Array<String|RegExp>undefinedFiles to include.
excludeString|RegExp|Array<String|RegExp>undefinedFiles to exclude.
parallelBoolean|NumbertrueEnable or disable multi-process parallel running.
minifyFunction|Array<Function>CssMinimizerPlugin.cssnanoMinifyAllows to override default minify function.
minimizerOptionsObject|Array<Object>{ preset: 'default' }Cssnano optimisations options.
warningsFilterFunction<(warning, file, source) -> Boolean>() => trueAllows filtering of css-minimizer warnings.
test
  • Type: String|RegExp|Array<String|RegExp>
  • Default: /\.css(\?.*)?$/i

Test to match files against.

module.exports = {
  optimization: {
    minimize: true,
    minimizer: [
      new CssMinimizerPlugin({
        test: /\.foo\.css$/i,
      }),
    ],
  },
};
include
  • Type: String|RegExp|Array<String|RegExp>
  • Default: undefined

Files to include.

webpack.config.js

module.exports = {
  optimization: {
    minimize: true,
    minimizer: [
      new CssMinimizerPlugin({
        include: /\/includes/,
      }),
    ],
  },
};
exclude
  • Type: String|RegExp|Array<String|RegExp>
  • Default: undefined

Files to exclude.

webpack.config.js

module.exports = {
  optimization: {
    minimize: true,
    minimizer: [
      new CssMinimizerPlugin({
        exclude: /\/excludes/,
      }),
    ],
  },
};
parallel
  • Type: Boolean|Number
  • Default: true

Use multi-process parallel running to improve the build speed.…

Description from the npm listing.

  • cssnano
  • css
  • csso
  • clean-css
  • swc
  • esbuild
  • webpack
  • webpack-plugin
  • minimize
  • minimizer
  • minify
  • minifier
  • optimize
  • optimizer

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@ohos-ports/css-minimizer-webpack-plugin weekly downloads on npm, last 90 days: 226 weekly downloads as of Nov 4, 2026.@ohos-ports/css-minimizer-webpack-plug…Weekly downloads on npm · Last 90 days226downloads / week200210220230240250Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20Nov 4downloads / weekNov 4, 2026 – Nov 4, 2026 · 1 observations · Updated Nov 4, 2026pluginstats.com
@ohos-ports/css-minimizer-webpack-plugin weekly downloads on npm, last 90 days: 226 weekly downloads as of Nov 4, 2026.

7/30/90-day growth

@ohos-ports/css-minimizer-webpack-plugin weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@ohos-ports/css-minimizer-webpack-plug…Weekly downloads growth on npm226downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Nov 4, 2026pluginstats.com
@ohos-ports/css-minimizer-webpack-plugin weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@ohos-ports/css-minimizer-webpack-plugin npm ranking history: currently #1777 (by weekly downloads).@ohos-ports/css-minimizer-webpack-plug…npm ranking · by weekly downloads · Last 90 days#1777current rank#1775#1776#1777#1778#1779Aug 8Aug 23Sep 7Sep 22Oct 7Oct 22Nov 6rankNov 6, 2026 – Nov 6, 2026 · 1 observations · Updated Nov 4, 2026pluginstats.com
@ohos-ports/css-minimizer-webpack-plugin npm ranking history: currently #1777 (by weekly downloads).

Listing placement

All npm2,864 listings · 144 pages · 1,434 shown · page 109, #12 (overall #2,172)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins305 listings · 16 pages · page 7, #1 (overall #121)
Webpack plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (1)
Recent weekly downloads observations for @ohos-ports/css-minimizer-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
226—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@ohos-ports/css-minimizer-webpack-plugin. First seen Nov 6, 2026; last successful collection Nov 6, 2026. See the methodology.