css-loader
Advanced tools
Comparing version 7.1.0 to 7.1.1
@@ -848,5 +848,8 @@ "use strict"; | ||
const normalizedNames = Array.isArray(names) ? new Set(names) : new Set([names]); | ||
for (const name of normalizedNames) { | ||
for (let name of normalizedNames) { | ||
const serializedValue = isTemplateLiteralSupported ? convertToTemplateLiteral(value) : JSON.stringify(value); | ||
if (options.modules.namedExport) { | ||
if (name === "default") { | ||
name = `_${name}`; | ||
} | ||
if (!validIdentifier.test(name) || keywords.has(name)) { | ||
@@ -853,0 +856,0 @@ identifierId += 1; |
{ | ||
"name": "css-loader", | ||
"version": "7.1.0", | ||
"version": "7.1.1", | ||
"description": "css loader module for webpack", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1159,3 +1159,3 @@ <div align="center"> | ||
> | ||
> It is not allowed to use the `default` reserved word in css classes. | ||
> Because it is not allowed to use the `default` class in CSS when the `namedExport` is `true` (since ECMA modules have a reserved keyword `default` for default export), it will be automatically renamed to the `_default` class. | ||
@@ -1171,2 +1171,5 @@ **styles.css** | ||
} | ||
.default { | ||
color: green; | ||
} | ||
``` | ||
@@ -1184,2 +1187,5 @@ | ||
console.log(styles.fooBaz, styles.bar); | ||
// For the `default` classname | ||
console.log(styles["_default"]); | ||
``` | ||
@@ -1186,0 +1192,0 @@ |
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
140777
2285
2335