Closed saltnpixels closed 3 years ago
The scripts I am hooking into: https://github.com/10up/10up-scripts/blob/develop/config/webpack.config.js
Interestingly i think it works on watch but not build...
After palying around I found that its the imagemin plugin... Its ruining the output... Anything I can do? I have tried putting this plugin before and after imagemin. Nothing works :/
I don't have much experience with the 10up scripts or the imagemin-webpack-plugin but IMO the most logical thing to do would be to exclude the generated spritemap from being minified by imagemin by using the test
option for that plugin.
This plugin already minifies the SVG using svgo
so there's no need to let imagemin minify the file again.
Closing this due to inactivity and it has a solution, feel free to comment if anything pops up ❤️
I am using a scripts build so I created a webpack.config file and extended the plugins and added this plugin in the hopes of having it generate the sprite.
This creates the file, but its empty. Any ideas why?