Skip to content

Commit 721bbf1

Browse files
fix: readable identifier (#1024)
1 parent 3a3cb51 commit 721bbf1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/index.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ class MiniCssExtractPlugin {
165165
}
166166

167167
identifier() {
168-
return `css|${this._identifier}|${this._identifierIndex}|${this.layer}|${this.supports}|${this.media}}}`;
168+
return `css|${this._identifier}|${this._identifierIndex}|${
169+
this.layer || ""
170+
}|${this.supports || ""}|${this.media}}}`;
169171
}
170172

171173
/**
@@ -175,7 +177,9 @@ class MiniCssExtractPlugin {
175177
readableIdentifier(requestShortener) {
176178
return `css ${requestShortener.shorten(this._identifier)}${
177179
this._identifierIndex ? ` (${this._identifierIndex})` : ""
178-
}`;
180+
}${this.layer ? ` (layer ${this.layer})` : ""}${
181+
this.supports ? ` (supports ${this.supports})` : ""
182+
}${this.media ? ` (media ${this.media})` : ""}`;
179183
}
180184

181185
// eslint-disable-next-line class-methods-use-this

0 commit comments

Comments
 (0)