diff --git a/lib/BannerPlugin.js b/lib/BannerPlugin.js index 04c50150f..c8d6c8ea0 100644 --- a/lib/BannerPlugin.js +++ b/lib/BannerPlugin.js @@ -46,14 +46,16 @@ const getReplacer = (value, allowEmpty) => { const interpolate = (banner, file, hash, chunkHash) => { - const [name, ext] = file.split("."); + const parts = file.split("."); + const name = parts[0]; + const ext = parts[1]; return banner .replace(REGEXP_HASH, withHashLength(getReplacer(hash))) .replace(REGEXP_CHUNKHASH, withHashLength(getReplacer(chunkHash))) .replace(REGEXP_NAME, name) .replace(REGEXP_EXT, ext); -} +}; class BannerPlugin { constructor(options) {