Skip to content

pantoken / plugins/postcss/props-minify/src / applyMinify

関数: applyMinify()

applyMinify(css, options?): string

ベータ

カスタムプロパティの最小化変換をスタイルシート文字列に適用します。

options から PostCSS プラグイン配列を構築し、同期的に実行します。プラグインの順序: pruneCustomPropsflattenPropertymangleCustomProps。オプションが設定されていない場合は入力を変更せずに返します。

パラメーター

css

string

変換するスタイルシートの文字列。

options?

PropsMinifyOptions = {}

PropsMinifyOptions.

戻り値

string

変換された CSS 文字列。

ts
import { applyMinify } from "@pantoken/plugin-props-minify";
const out = applyMinify(css, { prune: true, flatten: true, mangle: true });