Svg-sprite-loader: plainSprite extract mode emits incorrect id/url of symbols to the webpack chunk

Created on 1 Dec 2017  路  4Comments  路  Source: JetBrains/svg-sprite-loader

Do you want to request a feature, report a bug or ask a question?
Bug

What is the current behavior?
When using extract mode with plainSprite: true option, symbol id in resulting sprite is equals to original file name, but values of id and url properties in emitted webpack chunk is composed like this: {filename}-usage.

What is the expected behavior?
Id and url in emitted javascript-code should not be postfixed with "-usage", if extract mode with plainSprite: true is used.

The best way is to create repo with minimal setup to demonstrate a problem (package.json, webpack config and your code).
repository: https://github.com/3lvcz/svg-sprite-loader-issue
wrong id: https://github.com/3lvcz/svg-sprite-loader-issue/blob/master/dist/build.js#L84

Please tell us about your environment:

  • Node.js version: 8.9.1
  • webpack version: 3.9.1
  • svg-sprite-loader version: 3.4.1
  • OS type & version: OSX Sierra 10.12.6
bug

Most helpful comment

@3lvcz sorry for delay, fixed in [email protected]

All 4 comments

@3lvcz sorry for delay, fixed in [email protected]

I can reproduce it again

@kisenka were any changes for this in new releases?

Bump on this as well. Experiencing it with version 4.1.3.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alex-Sokolov picture Alex-Sokolov  路  3Comments

Mighty683 picture Mighty683  路  3Comments

zecka picture zecka  路  4Comments

jpzwarte picture jpzwarte  路  7Comments

gzaripov picture gzaripov  路  3Comments