Svg-sprite-loader: spriteFilename doesn't work when using rule.oneOf setup

Created on 14 Sep 2017  路  4Comments  路  Source: JetBrains/svg-sprite-loader

Do you want to request a feature, report a bug or ask a question?
Bug (I guess)

What is the current behavior?
Option spriteFilename doesn't work (fallback to default sprite.svg) when using a specific webpack's rules configuration (explained below).

What is the expected behavior?
Option spriteFilename should always work

Please tell us about your environment:

  • Node.js version: 8.3.0
  • webpack version: 3.5.6
  • svg-sprite-loader version: 3.2.5
  • OS type & version: Windows 10

Reproduction link:
https://github.com/sqal/svg-sprite-loader-bug-repro/blob/master/webpack.config.js

In my project i keep all of my loaders rules in Rule.oneOf object, similar to how create-react-app does it. But I found out there's one problem with this setup and spriteFilename option - it just doesn't work. To check this out please do:

  • clone my repo
  • npm run build - everything works correctly
  • now try with oneOf setup, so set USE_ONEOF_SETUP var to true - now sprite is being generated with default sprite.svg name

Is there something that I am doing wrong or is it the plugin bug? Thanks for looking into this :)

Most helpful comment

@kisenka this issue is solved in v3.2.6, you can close it

All 4 comments

@kisenka this issue is solved in v3.2.6, you can close it

@kisenka @CXHtml Can you publish v3.2.6 tp npm? I think my build is suffering from this issue as well.

@soluml sorry, I forgot to publish it :) Now it's published

Better late then never :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

llushikang picture llushikang  路  4Comments

gregorvoinov picture gregorvoinov  路  7Comments

evgenyrodionov picture evgenyrodionov  路  4Comments

zecka picture zecka  路  4Comments

suamikim picture suamikim  路  5Comments