From cbfdc000e9ca9e916b898f956193bf51de9cea06 Mon Sep 17 00:00:00 2001 From: Igor Frolov Date: Tue, 15 Oct 2019 10:07:42 +0300 Subject: [PATCH] Use publicPath only for html plugin case --- lib/plugin.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/plugin.js b/lib/plugin.js index ff12ce7..dab9bdd 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -167,11 +167,8 @@ class SVGSpritePlugin { const chunk = new Chunk(chunkName); chunk.ids = []; chunk.files.push(filename); - const filenamePrefix = this.rules.publicPath - ? this.rules.publicPath.replace(/^\//, '') - : ''; - compilation.assets[`${filenamePrefix}${filename}`] = { + compilation.assets[filename] = { source() { return content; }, size() { return content.length; } };