Reputation: 3442
https://www.npmjs.com/package/image-webpack-loader
i use this loader module for images optimization , but I have 1 svg with animation ,when webpack optimize it , it seems broken , is it possible to exclude this image optimization (only 1 image) ?
export default new WebpackConfig()
.extend({
'[root]/browser.js': config => {
config.module.rules
.find(l => l.test.toString() === regex.images.toString())
.use.push({
loader: 'image-webpack-loader'
})
return config
}
})
below you can see my code snippet
Upvotes: 1
Views: 302
Reputation: 3442
const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin')
export const imageMinimizePlugin = new ImageMinimizerPlugin({
test: regex.images,
exclude: [PATHS.activeMenuAnimateSvg]
})
found another plugin which gives the opportunity to make it
Upvotes: 1