You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Love your plugin and it's working wonders for the project I'm working on.
I only had one issue that rendered svgs that had more than one class defined in styles look completely awful. After almost two days of trying to fix or work around the problem, I finally found out that inlineStyles takes an object with a prop onlyMatchedOnce that is by default set to true if inlineStyles only gets true. By setting it to false, suddenly everything works perfectly. The SVGO documentation is not very good for pointing out that this work, so I had to look around in random source code files for SVGO to find this.
For anyone else looking to implement html-webpack-inline-svg-plugin with minimal configuration how about setting inlineStyles: { onlyMatchedOnce: false } for default value? I cannot for the love of me understand why the SVGO guys figured hiding that prop is a good idea, because some projects with complicated svgs and several classes defined inside a style-tag is going to have the exact same problem.
The text was updated successfully, but these errors were encountered:
Hi,
Love your plugin and it's working wonders for the project I'm working on.
I only had one issue that rendered svgs that had more than one class defined in styles look completely awful. After almost two days of trying to fix or work around the problem, I finally found out that inlineStyles takes an object with a prop onlyMatchedOnce that is by default set to true if inlineStyles only gets true. By setting it to false, suddenly everything works perfectly. The SVGO documentation is not very good for pointing out that this work, so I had to look around in random source code files for SVGO to find this.
For anyone else looking to implement html-webpack-inline-svg-plugin with minimal configuration how about setting inlineStyles: { onlyMatchedOnce: false } for default value? I cannot for the love of me understand why the SVGO guys figured hiding that prop is a good idea, because some projects with complicated svgs and several classes defined inside a style-tag is going to have the exact same problem.
The text was updated successfully, but these errors were encountered: