🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

clean-css-loader

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-css-loader - npm Package Compare versions

Comparing version

to
4.2.1

@@ -17,5 +17,21 @@ "use strict";

}
function getLoaderOptions(_that) {
if (typeof loader_utils_1.getOptions === "function") {
return (0, loader_utils_1.getOptions)(_that) || {};
}
if (typeof _that.getOptions === "function") {
const rawOptions = _that.getOptions() || {};
Object.keys(rawOptions).forEach((key) => {
const value = rawOptions[key];
if (["false", "true", "null"].includes(value)) {
rawOptions[key] = JSON.parse(value);
}
});
return rawOptions;
}
return {};
}
function cleanCssLoader(content, prevSourceMap, additionalData) {
const callback = this.async();
const loaderOptions = (typeof this.getOptions === "function" ? this.getOptions() : loader_utils_1.getOptions === null || loader_utils_1.getOptions === void 0 ? void 0 : (0, loader_utils_1.getOptions)(this)) || {};
const loaderOptions = getLoaderOptions(this);
(0, schema_utils_1.validate)(schema_json_1.default, loaderOptions, {

@@ -22,0 +38,0 @@ name: "clean-css-loader",

{
"name": "clean-css-loader",
"version": "4.2.0",
"version": "4.2.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"dependencies": {
"clean-css": "^5.0.0"
"clean-css": "^5.0.0"
},
"peerDependencies": {
"schema-utils": "^3.0.0 || ^4.0.0",
"loader-utils": "^1.0.0 || ^2.0.0 || ^3.0.0",

@@ -17,5 +18,8 @@ "webpack": ">=2.0.0"

},
"loader-utils": {
"optional": true
}
"loader-utils": {
"optional": true
},
"schema-utils": {
"optional": true
}
},

@@ -22,0 +26,0 @@ "scripts": {