cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
207 stars 50 forks source link

Upgrade to svgo 2 #159

Closed bkeepers closed 3 years ago

bkeepers commented 3 years ago

Thanks for making this great webpack plugin! I stumbled on this while working on upgrading the icon build process in an app and it's working great.

I would to use some plugin features from svgo 2, so I've started to work on upgrading it in this pull request. The tests are passing, but there is still an issue with using config that is passed in from output.svgo.

cascornelissen commented 3 years ago

Thanks for your contribution! ❤️ Feel free to let me know if you want a review/when all todo's are checked.

I'm pretty sure this will mean a new major release of this plugin as well since the new configuration will be incompatible with the old configuration (at least for the output.svgo options object), can you confirm?

If so, I think it makes sense to also look into other major dependency updates before releasing a new major version of this plugin. Looks like svg-element-attributes is the only other one and it was released 2 days ago with no mentions of breaking changes in the changelog (although at least the switch to ESM might be breaking in our case). Not saying I'm expecting that in this PR but just making a note of it.

cascornelissen commented 3 years ago

Hi @bkeepers, not trying to rush you or anything but I was wondering about the status on this? Is it still in draft?

bkeepers commented 3 years ago

Hey @cascornelissen, sorry for not following up. This current version is working and you’re welcome to merge as is. I was going to add built in support for loading svgo.config.js, but I ended up just loading it in my webpack config.

cascornelissen commented 3 years ago

@bkeepers, thanks for the update and no problem at all. If I find some time I'll see if we can get this merged and released ✌🏼

cascornelissen commented 3 years ago

@bkeepers, finally had some time to look into this and I started updating all dependencies in a new 4.0 branch, your work sped things up a lot so a big thanks for that! ❤️

There's one dependency that could not be updated, more information is available at https://github.com/wooorm/svg-element-attributes/issues/3,

I'm interested in hearing from users if these changes work for them, it would be great if you could install the plugin directly from the GitHub branch by using the following command and reporting back.

npm install cascornelissen/svg-spritemap-webpack-plugin#4.0
cascornelissen commented 3 years ago

This update was released in 4.0.0, thanks for your contribution! 🚀