Fix image pipeline
This commit is contained in:
parent
e18b6692ad
commit
a2c6e620c9
3 changed files with 4 additions and 26 deletions
|
|
@ -48,7 +48,6 @@
|
||||||
"file-loader": "^5.1.0",
|
"file-loader": "^5.1.0",
|
||||||
"html-webpack-inline-source-plugin": "0.0.10",
|
"html-webpack-inline-source-plugin": "0.0.10",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"image-webpack-loader": "^6.0.0",
|
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 475 KiB |
|
|
@ -60,14 +60,16 @@ module.exports = (env, argv) => ({
|
||||||
loader: 'responsive-loader',
|
loader: 'responsive-loader',
|
||||||
options: {
|
options: {
|
||||||
adapter: Sharp,
|
adapter: Sharp,
|
||||||
name: '[contenthash]-[width].[ext]',
|
name: '[contenthash].[ext]',
|
||||||
outputPath: 'static/',
|
outputPath: 'static/',
|
||||||
sizes: [200, 400, 800, 1200, 1600, 2000],
|
sizes: [200, 400, 800, 1200, 1600, 2000],
|
||||||
|
quality: 0.9,
|
||||||
format: 'webp',
|
format: 'webp',
|
||||||
|
progressive: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(webm|mp4|gif)$/i,
|
test: /\.(webm|mp4)$/i,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
|
|
@ -76,29 +78,6 @@ module.exports = (env, argv) => ({
|
||||||
name: '[contenthash].[ext]',
|
name: '[contenthash].[ext]',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
loader: 'image-webpack-loader',
|
|
||||||
options: {
|
|
||||||
disable: argv.mode === 'development',
|
|
||||||
mozjpeg: {
|
|
||||||
progressive: true,
|
|
||||||
quality: 65,
|
|
||||||
},
|
|
||||||
optipng: {
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
pngquant: {
|
|
||||||
quality: [0.65, 0.9],
|
|
||||||
speed: 4,
|
|
||||||
},
|
|
||||||
gifsicle: {
|
|
||||||
interlaced: false,
|
|
||||||
},
|
|
||||||
webp: {
|
|
||||||
quality: 65,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue