Open mperu92 opened 4 years ago
I'm having this error when bundling jpg images using image-webpack-plugin
image-webpack-plugin
ERROR in ./wwwroot/images/gallery/15.JPG Module build failed (from ./node_modules/image-webpack-loader/index.js): Error: write EOF
I am using webpack v^4.43.0 and image-webpack-plugin v^6.0.0 and node v12.18.0;
webpack v^4.43.0
image-webpack-plugin v^6.0.0
node v12.18.0;
This is my webpack.config.js config:
webpack.config.js
{ test: /\.(gif|png|jpe?g|svg)$/i, loaders: [ { loader: 'file-loader', options: { name: 'images/[name].[ext]' } }, { loader: 'image-webpack-loader', options: { mozjpeg: { progressive: true, quality: 65 }, // optipng.enabled: false will disable optipng optipng: { enabled: false, }, pngquant: { quality: [0.65, 0.90], speed: 4 }, gifsicle: { interlaced: false, }, // the webp option will enable WEBP webp: { quality: 75 } } }, ] }
Hi. if you were working in the mainland of PRC. you'd better uninstall image-webpack-loader and try to cnpm install image-webpack-loader. i came across the same trouble recently.
I'm having this error when bundling jpg images using
image-webpack-plugin
I am using
webpack v^4.43.0
andimage-webpack-plugin v^6.0.0
andnode v12.18.0;
This is my
webpack.config.js
config: