Skip to content

Commit

Permalink
fix: readable identifier (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Mar 16, 2023
1 parent 3a3cb51 commit 721bbf1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ class MiniCssExtractPlugin {
}

identifier() {
return `css|${this._identifier}|${this._identifierIndex}|${this.layer}|${this.supports}|${this.media}}}`;
return `css|${this._identifier}|${this._identifierIndex}|${
this.layer || ""
}|${this.supports || ""}|${this.media}}}`;
}

/**
Expand All @@ -175,7 +177,9 @@ class MiniCssExtractPlugin {
readableIdentifier(requestShortener) {
return `css ${requestShortener.shorten(this._identifier)}${
this._identifierIndex ? ` (${this._identifierIndex})` : ""
}`;
}${this.layer ? ` (layer ${this.layer})` : ""}${
this.supports ? ` (supports ${this.supports})` : ""
}${this.media ? ` (media ${this.media})` : ""}`;
}

// eslint-disable-next-line class-methods-use-this
Expand Down

0 comments on commit 721bbf1

Please sign in to comment.