Closed Vahanerevan closed 2 years ago
To be honest, I'm not sure if that's possible but I'm willing to accept a PR that improves the performance by not generating the spritemap if no sprites changed. I might look into it myself some time in the future if I find some time.
One question I do have is whether those 15s you mentioned is the added time when the plugin is enabled or does the entire compilation take 15s (and what part is the plugin taking up in that case)? I'm asking because I can't imagine 200 sprites would take 15s to generate based on the specs you've included.
Had half an hour of nothing to do and the changes in eae59fb seem to do what you're looking for on my end.
Could you try it out on your end by installing directly from master
by running the following command?
npm install cascornelissen/svg-spritemap-webpack-plugin#master
Thank you . @cascornelissen we tested it we have gone from 15s to 8s . 50% speed up. It did not solve our issue but for most of people it will be enough. After investigation we found out that we had big svg files and changed out method to lazy loading . We still use plugin for other svg icons which are not big and it works perfect . Thank you so much for your help.
I have just published 4.5.0
to npm. Thanks for the idea and for reporting back! ❤️
Thank you for plugin it saves so much time .
Description We are having little issue with webpack watch mode: when we update any file (js,css, not svg) in source plugin regenerates files . We have 200+ icons so compilation takes 15+ seconds . Ss there any way to build once in watch mode or prevent rebuild if svgs did not change ?
We use html plugin.
Expected behavior Expecting not to rebuild if nothing changes.
Actual behavior
Rebuild when editing any js file.
System information