mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
Merge pull request #6 from GaoYYYang/master
Replacing imagemin-webpack with img-opttimize-loader
This commit is contained in:
commit
f6815674b8
@ -43,7 +43,7 @@
|
||||
"exif-js": "^2.3.0",
|
||||
"font-awesome": "^4.7.0",
|
||||
"hammerjs": "^2.0.8",
|
||||
"img-optimize-loader": "^1.0.6",
|
||||
"img-optimize-loader": "^1.0.7",
|
||||
"inputmask": "^5.0.3",
|
||||
"jquery": "^3.5.1",
|
||||
"jquery-hammerjs": "^2.0.0",
|
||||
|
@ -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,
|
||||
@ -274,12 +274,11 @@ module.exports = merge(common, {
|
||||
},
|
||||
],
|
||||
},
|
||||
/*{
|
||||
{
|
||||
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
|
||||
loader: 'img-optimize-loader',
|
||||
options: {
|
||||
//name: '[path][name].[ext]', //'[path][name]-[contenthash].[ext]'
|
||||
name: conf['webp'] ? '[path][name].webp' : '[path][name].[ext]',
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'img/',
|
||||
publicPath: '../img/',
|
||||
compress: {
|
||||
@ -292,15 +291,6 @@ module.exports = merge(common, {
|
||||
limit: 1,
|
||||
},
|
||||
},
|
||||
},*/
|
||||
{
|
||||
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: conf['webp'] ? '[name].webp' : '[name].[ext]',
|
||||
outputPath: 'img/',
|
||||
publicPath: '../img/',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user