Skip to content

Commit

Permalink
fix: don't create additional chunk for sprite
Browse files Browse the repository at this point in the history
Closes: #364
  • Loading branch information
kisenka committed Apr 12, 2020
1 parent d22853f commit 80ebfa3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/plugin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */
const merge = require('deepmerge');
const Promise = require('bluebird');
const Chunk = require('webpack/lib/Chunk');
const SVGCompiler = require('svg-baker');
const spriteFactory = require('svg-baker/lib/sprite-factory');
const Sprite = require('svg-baker/lib/sprite');
Expand Down Expand Up @@ -163,10 +162,6 @@ class SVGSpritePlugin {
})
.then((sprite) => {
const content = sprite.render();
const chunkName = filename.replace(/\.svg$/, '');
const chunk = new Chunk(chunkName);
chunk.ids = [];
chunk.files.push(filename);
const filenamePrefix = this.rules.publicPath
? this.rules.publicPath.replace(/^\//, '')
: '';
Expand All @@ -175,8 +170,6 @@ class SVGSpritePlugin {
source() { return content; },
size() { return content.length; }
};

compilation.chunks.push(chunk);
});
});
}
Expand Down

0 comments on commit 80ebfa3

Please sign in to comment.