JetBrains / svg-sprite-loader

Webpack loader for creating SVG sprites.
MIT License
2.01k stars 271 forks source link

Duplication symbol in sprite #328

Closed AlexanderGogolev closed 5 years ago

AlexanderGogolev commented 5 years ago

Hello, I use plugin with options

 {
     test: /\.svg$/,
     loader: 'svg-sprite-loader',
     options: {
        extract: true,
         spriteFilename: 'assets/sprite.svg'
      }
   },

On build I have duplication symbols on result sprite I include svg in pug file in the following way:

use(xlink:href=require('../assets/svg/union.svg').url)
jonjhiggins commented 5 years ago

Having the same issue, looks like its due to https://github.com/JetBrains/svg-mixer/issues/43

Looks like it would be resolved by the PR attached to issue: https://github.com/JetBrains/svg-mixer/pull/46/commits/25846c94e3f605c2e9583301b99df2c5fb8e77a3

Tried applying that PR to svg-baker/lib/compiler.js locally and it fixed it for me

kisenka commented 5 years ago

Fixed in svg-sprite-loader@4.1.6, please update