Skip to content

Node.js based forum software built for the modern web

refactor: remove postcss-clean

Barış Soner Uşaklıd1ee699f8086
diff --git a/install/package.json b/install/package.json
index 1189fd876c..f5fdb7bc8b 100644
--- a/install/package.json
+++ b/install/package.json
@@ -126,7 +126,6 @@
"pg": "8.23.0",
"pg-cursor": "2.22.0",
"postcss": "8.5.28",
- "postcss-clean": "1.2.0",
"pretty": "^2.0.0",
"progress-webpack-plugin": "1.0.16",
"prompt": "1.3.0",
diff --git a/src/meta/minifier.js b/src/meta/minifier.js
index 3120255081..6c83ddd86a 100644
--- a/src/meta/minifier.js
+++ b/src/meta/minifier.js
@@ -6,7 +6,6 @@ const async = require('async');
const winston = require('winston');
const postcss = require('postcss');
const autoprefixer = require('autoprefixer');
-const clean = require('postcss-clean');
const rtlcss = require('rtlcss');
const sass = require('../utils').getSass();
@@ -224,6 +223,7 @@ actions.buildCSS = async function buildCSS(data) {
importers: [new sass.NodePackageImporter()],
};
if (data.minify) {
+ opts.style = 'compressed';
opts.silenceDeprecations = [
'legacy-js-api', 'color-functions',
'global-builtin', 'import', 'if-function',
@@ -243,11 +243,6 @@ actions.buildCSS = async function buildCSS(data) {
});
}
const postcssArgs = [autoprefixer];
- if (data.minify) {
- postcssArgs.push(clean({
- processImportFrom: ['local'],
- }));
- }
return await postcss(postcssArgs).process(css, {
from: undefined,
});