Closed domq closed 3 years ago
Knowing that svg-spritemap-webpack-plugin eats up spaces in IDs (on account of them being forbidden by the HTML spec), here is a workaround ☺
plugins: [
// ...
new SVGSpritemapPlugin("**/*.svg",
{
sprite: { prefix: " " }
})
]
(i.e. a single space for sprite.prefix
)
It's not an "error" in the sense that something is going wrong, it's a validation error as in it's not allowed to provide an empty string.
If you don't want a prefix specify false
as explained in the docs. If you want something else please explain a bit further 😄
I suppose that my request is that the empty string be accepted as a valid prefix? To me at least it does seems valid, and is more intuitive than false
which — Unless my ⌘F prefix
skills are failing me all of a sudden — I find myself having a hard time concurring that it is explained in the docs, as opposed to glossed over in a type description.
With best regards, Dominique
Not sure I agree with the reasoning but it can't hurt to also support an empty string. Feel free to send in a PR 👍🏼
This has been released in version 4.1.0
, thanks for your contribution 🚀
Description
Putting this in your webpack.config.js triggers an error:
Expected behavior
IDs are generated from the file name as usual, except without a prefix
Actual behavior
System information