Closed elvingm closed 7 years ago
In my app.production.js I have tried the following configs for image-webpack-loader so it can optimize my images:
app.production.js
image-webpack-loader
{ test: /\.(jpe?g|png|gif|svg)$/i, loader: 'source!image-webpack' }
{ test: /\.(jpe?g|png|gif|svg)$/i, loader: 'source-loader!image-webpack' }
{ test: /\.(jpe?g|png|gif|svg)$/i, loaders: [ 'file?hash=sha512&digest=hex&name=[hash].[ext]', 'image-webpack' ] }
and with the file-loader as well as recommended by image-webpack-loader docs
file-loader
{ test: /\.(jpe?g|png|gif|svg)$/i, loaders: [ 'file?hash=sha512&digest=hex&name=[hash].[ext]', 'source!image-webpack' ] }
In each case the only file that gets passed through is favicon.ico out of a list of images which contain jpg's, gif, png, and svgs.
favicon.ico
So the fix here is just to run it with image-webpack and no source loader 😁 Just a followup before closing!
image-webpack
In my
app.production.js
I have tried the following configs forimage-webpack-loader
so it can optimize my images:and with the
file-loader
as well as recommended by image-webpack-loader docsIn each case the only file that gets passed through is
favicon.ico
out of a list of images which contain jpg's, gif, png, and svgs.