css-loader
Advanced tools
Comparing version 6.0.0 to 6.1.0
@@ -6,3 +6,4 @@ { | ||
"url": { | ||
"description": "Allows to enables/disables `url()`/`image-set()` functions handling (https://github.com/webpack-contrib/css-loader#url).", | ||
"description": "Allows to enables/disables `url()`/`image-set()` functions handling.", | ||
"link": "https://github.com/webpack-contrib/css-loader#url", | ||
"anyOf": [ | ||
@@ -24,3 +25,4 @@ { | ||
"import": { | ||
"description": "Allows to enables/disables `@import` at-rules handling (https://github.com/webpack-contrib/css-loader#import).", | ||
"description": "Allows to enables/disables `@import` at-rules handling.", | ||
"link": "https://github.com/webpack-contrib/css-loader#import", | ||
"anyOf": [ | ||
@@ -42,3 +44,4 @@ { | ||
"modules": { | ||
"description": "Allows to enable/disable CSS Modules or ICSS and setup configuration (https://github.com/webpack-contrib/css-loader#modules).", | ||
"description": "Allows to enable/disable CSS Modules or ICSS and setup configuration.", | ||
"link": "https://github.com/webpack-contrib/css-loader#modules", | ||
"anyOf": [ | ||
@@ -56,3 +59,4 @@ { | ||
"auto": { | ||
"description": "Allows auto enable CSS modules based on filename (https://github.com/webpack-contrib/css-loader#auto).", | ||
"description": "Allows auto enable CSS modules based on filename.", | ||
"link": "https://github.com/webpack-contrib/css-loader#auto", | ||
"anyOf": [ | ||
@@ -71,3 +75,4 @@ { | ||
"mode": { | ||
"description": "Setup `mode` option (https://github.com/webpack-contrib/css-loader#mode).", | ||
"description": "Setup `mode` option.", | ||
"link": "https://github.com/webpack-contrib/css-loader#mode", | ||
"anyOf": [ | ||
@@ -83,3 +88,4 @@ { | ||
"localIdentName": { | ||
"description": "Allows to configure the generated local ident name (https://github.com/webpack-contrib/css-loader#localidentname).", | ||
"description": "Allows to configure the generated local ident name.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localidentname", | ||
"type": "string", | ||
@@ -89,3 +95,4 @@ "minLength": 1 | ||
"localIdentContext": { | ||
"description": "Allows to redefine basic loader context for local ident name (https://github.com/webpack-contrib/css-loader#localidentcontext).", | ||
"description": "Allows to redefine basic loader context for local ident name.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localidentcontext", | ||
"type": "string", | ||
@@ -95,3 +102,4 @@ "minLength": 1 | ||
"localIdentHashSalt": { | ||
"description": "Allows to add custom hash to generate more unique classes (https://github.com/webpack-contrib/css-loader#localidenthashsalt).", | ||
"description": "Allows to add custom hash to generate more unique classes.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashsalt", | ||
"type": "string", | ||
@@ -101,3 +109,4 @@ "minLength": 1 | ||
"localIdentHashFunction": { | ||
"description": "Allows to specify hash function to generate classes (https://github.com/webpack-contrib/css-loader#localidenthashfunction).", | ||
"description": "Allows to specify hash function to generate classes.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashfunction", | ||
"type": "string", | ||
@@ -107,3 +116,4 @@ "minLength": 1 | ||
"localIdentHashDigest": { | ||
"description": "Allows to specify hash digest to generate classes (https://github.com/webpack-contrib/css-loader#localidenthashdigest).", | ||
"description": "Allows to specify hash digest to generate classes.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashdigest", | ||
"type": "string", | ||
@@ -113,7 +123,9 @@ "minLength": 1 | ||
"localIdentHashDigestLength": { | ||
"description": "Allows to specify hash digest length to generate classes (https://github.com/webpack-contrib/css-loader#localidenthashdigestlength).", | ||
"description": "Allows to specify hash digest length to generate classes.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashdigestlength", | ||
"type": "number" | ||
}, | ||
"localIdentRegExp": { | ||
"description": "Allows to specify custom RegExp for local ident name (https://github.com/webpack-contrib/css-loader#localidentregexp).", | ||
"description": "Allows to specify custom RegExp for local ident name.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localidentregexp", | ||
"anyOf": [ | ||
@@ -130,15 +142,19 @@ { | ||
"getLocalIdent": { | ||
"description": "Allows to specify a function to generate the classname (https://github.com/webpack-contrib/css-loader#getlocalident).", | ||
"description": "Allows to specify a function to generate the classname.", | ||
"link": "https://github.com/webpack-contrib/css-loader#getlocalident", | ||
"instanceof": "Function" | ||
}, | ||
"namedExport": { | ||
"description": "Enables/disables ES modules named export for locals (https://github.com/webpack-contrib/css-loader#namedexport).", | ||
"description": "Enables/disables ES modules named export for locals.", | ||
"link": "https://github.com/webpack-contrib/css-loader#namedexport", | ||
"type": "boolean" | ||
}, | ||
"exportGlobals": { | ||
"description": "Allows to export names from global class or id, so you can use that as local name (https://github.com/webpack-contrib/css-loader#exportglobals).", | ||
"description": "Allows to export names from global class or id, so you can use that as local name.", | ||
"link": "https://github.com/webpack-contrib/css-loader#exportglobals", | ||
"type": "boolean" | ||
}, | ||
"exportLocalsConvention": { | ||
"description": "Style of exported classnames (https://github.com/webpack-contrib/css-loader#localsconvention).", | ||
"description": "Style of exported classnames.", | ||
"link": "https://github.com/webpack-contrib/css-loader#localsconvention", | ||
"enum": [ | ||
@@ -153,3 +169,4 @@ "asIs", | ||
"exportOnlyLocals": { | ||
"description": "Export only locals (https://github.com/webpack-contrib/css-loader#exportonlylocals).", | ||
"description": "Export only locals.", | ||
"link": "https://github.com/webpack-contrib/css-loader#exportonlylocals", | ||
"type": "boolean" | ||
@@ -162,7 +179,9 @@ } | ||
"sourceMap": { | ||
"description": "Allows to enable/disable source maps (https://github.com/webpack-contrib/css-loader#sourcemap).", | ||
"description": "Allows to enable/disable source maps.", | ||
"link": "https://github.com/webpack-contrib/css-loader#sourcemap", | ||
"type": "boolean" | ||
}, | ||
"importLoaders": { | ||
"description": "Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports (https://github.com/webpack-contrib/css-loader#importloaders).", | ||
"description": "Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.", | ||
"link": "https://github.com/webpack-contrib/css-loader#importloaders", | ||
"anyOf": [ | ||
@@ -181,3 +200,4 @@ { | ||
"esModule": { | ||
"description": "Use the ES modules syntax (https://github.com/webpack-contrib/css-loader#esmodule).", | ||
"description": "Use the ES modules syntax.", | ||
"link": "https://github.com/webpack-contrib/css-loader#esmodule", | ||
"type": "boolean" | ||
@@ -184,0 +204,0 @@ } |
@@ -373,3 +373,15 @@ "use strict"; | ||
return loaderContext._compilation.getPath(localIdentName, data); | ||
let result = loaderContext._compilation.getPath(localIdentName, data); | ||
if (options.regExp) { | ||
const match = loaderContext.resourcePath.match(options.regExp); | ||
if (match) { | ||
match.forEach((matched, i) => { | ||
result = result.replace(new RegExp(`\\[${i}\\]`, "ig"), matched); | ||
}); | ||
} | ||
} | ||
return result; | ||
} | ||
@@ -376,0 +388,0 @@ |
{ | ||
"name": "css-loader", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "css loader module for webpack", | ||
@@ -64,3 +64,3 @@ "license": "MIT", | ||
"del": "^6.0.0", | ||
"del-cli": "^4.0.0", | ||
"del-cli": "^4.0.1", | ||
"es-check": "^5.2.4", | ||
@@ -90,3 +90,3 @@ "eslint": "^7.30.0", | ||
"url-loader": "^4.1.1", | ||
"webpack": "^5.44.0" | ||
"webpack": "^5.45.1" | ||
}, | ||
@@ -93,0 +93,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114478
1937