mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
FIX: img-optimize-loader
Thank for the request. Found 2 issues: + Images were converted to WebP by imagemin-webpack. Anyway it's excessive compression module so I have commented it out + Had to define name param for the img-optimize-loader to store images properly on build
This commit is contained in:
parent
a14a94cbef
commit
5d006cb0f9
@ -17,7 +17,7 @@ const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
const ImageminPlugin = require('imagemin-webpack');
|
||||
//const ImageminPlugin = require('imagemin-webpack');
|
||||
//const ImageSpritePlugin = require('@a2nt/image-sprite-webpack-plugin');
|
||||
|
||||
const COMPRESS = true;
|
||||
@ -81,7 +81,7 @@ let plugins = [
|
||||
windows: true,
|
||||
},
|
||||
}),
|
||||
new ImageminPlugin({
|
||||
/*new ImageminPlugin({
|
||||
bail: false, // Ignore errors on corrupted images
|
||||
cache: true,
|
||||
maxConcurrency: 3,
|
||||
@ -107,7 +107,7 @@ let plugins = [
|
||||
['webp', { quality: 100 }],
|
||||
],
|
||||
},
|
||||
}),
|
||||
}),*/
|
||||
/*new ImageSpritePlugin({
|
||||
exclude: /exclude|original|default-|icons|sprite/,
|
||||
commentOrigin: false,
|
||||
@ -278,6 +278,7 @@ module.exports = merge(common, {
|
||||
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
|
||||
loader: 'img-optimize-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'img/',
|
||||
publicPath: '../img/',
|
||||
compress: {
|
||||
|
Loading…
Reference in New Issue
Block a user