mirror of https://github.com/webpack/webpack.git
Merge pull request #9559 from jamesgeorge007/feat/refactor-banner-plugin
chore: Minor refactor
This commit is contained in:
commit
9f27d0c6c8
|
|
@ -81,7 +81,6 @@ class BannerPlugin {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let basename;
|
|
||||||
let query = "";
|
let query = "";
|
||||||
let filename = file;
|
let filename = file;
|
||||||
const hash = compilation.hash;
|
const hash = compilation.hash;
|
||||||
|
|
@ -94,11 +93,10 @@ class BannerPlugin {
|
||||||
|
|
||||||
const lastSlashIndex = filename.lastIndexOf("/");
|
const lastSlashIndex = filename.lastIndexOf("/");
|
||||||
|
|
||||||
if (lastSlashIndex === -1) {
|
const basename =
|
||||||
basename = filename;
|
lastSlashIndex === -1
|
||||||
} else {
|
? filename
|
||||||
basename = filename.substr(lastSlashIndex + 1);
|
: filename.substr(lastSlashIndex + 1);
|
||||||
}
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
hash,
|
hash,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue