diff --git a/package.json b/package.json index 1ad5bef..7723865 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-svg-sprite-generator", - "version": "1.0.15", + "version": "1.0.16", "description": "", "main": "plugin.js", "types": "ts/index.d.ts", diff --git a/plugin/generator.ts b/plugin/generator.ts index 98afac2..e81b012 100644 --- a/plugin/generator.ts +++ b/plugin/generator.ts @@ -294,6 +294,9 @@ export async function generateSprite(files: string[]) : Promise if(isNaN(width) || isNaN(height)) { console.warn("Skipping SVG %s because of invalid bounds (Parsed: %d x %d, Values: %o).", file, width, height, rootAttributes["viewBox"].split(" ")); continue; + } else if(Math.floor(width) !== width || Math.floor(height) !== height) { + console.warn("Skipping SVG %s because of an non interger height/width (%fx%f)", file, width, height); + continue; } svg.bounds = {