JetBrains / svg-sprite-loader

Webpack loader for creating SVG sprites.
MIT License
2.02k stars 270 forks source link

plainSprite setting in loader instead of plugin #405

Open Friksel opened 4 years ago

Friksel commented 4 years ago

Do you want to request a feature, report a bug or ask a question? Feature request / Question. Not sure if this is somehow possible now, but couldn't get it to work

What is the current behavior? plainSprite only seems to work when used in the plugin, but that seems to make it impossible to have two streams in a webpack config: one with plainSprites turned on (to generate a sprite file without color-information, like simple icons), and one with plainSprites tunred off (to generate a sprite file with sprites that needs more than one color, like multi-color logos, UI-graphics and so on)

What is the expected behavior? It would be nice to be able to set the plainSprite option per loader, so we can bind a folder like 'images/plainSprites' to a loader with the plainSprite turned on and a 'images/sprites' to a loader with plainSprite turned off.

If this is a feature request, what is motivation or use case for changing the behavior? Use case: two sprite output files: 1) Sprites without color/style information, like simple icons (so plainSprite turned on) 2) Sprites with color/styles information, like multi-color UI graphics/illustrations/logo's etc. (so plainSprite turned off)

Please tell us about your environment: