We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b545b51 + 5d93c53 commit 80ed1c4Copy full SHA for 80ed1c4
lib/BannerPlugin.js
@@ -47,10 +47,12 @@ class BannerPlugin {
47
filename = filename.substr(0, querySplit);
48
}
49
50
- if(filename.indexOf("/") < 0) {
+ const lastSlashIndex = filename.lastIndexOf("/");
51
+
52
+ if(lastSlashIndex === -1) {
53
basename = filename;
54
} else {
- basename = filename.substr(filename.lastIndexOf("/") + 1);
55
+ basename = filename.substr(lastSlashIndex + 1);
56
57
58
const comment = compilation.getPath(banner, {
0 commit comments