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; } };