0

I followed this thread

Webpack 2: WARNING in .png, .svg, .. DEPRECATED. Configure optipng's optimizationLevel option in it's own options. (optipng.optimizationLevel)

here's my webpack

  var webpack = require("webpack");
var path = require("path");
var ExtractTextPlugin = require('extract-text-webpack-plugin');


module.exports = {
  entry: {app: './src/app.js' },
  output: {filename: 'public/build/bundle.js',
        sourceMapFilename: 'public/build/bundle.map' },
  module: {
    loaders: [
      { test: /\.(js|jsx)$/, loader: 'babel-loader',query: {
        presets: ['stage-0','react','es2015'],
        plugins: ["transform-decorators-legacy","transform-class-properties"]
    } },
      { test: /\.css$/, loaders: [ 'style-loader', 'css-loader' ] },
      { test: /\.(eot|svg|ttf|woff|woff2)$/, loader: 'file?name=public/fonts/[name].[ext]'  },
      {
  test: /\.(jpe?g|png|gif|svg)$/i,
  loaders: [
    'file?hash=sha512&digest=hex&name=[hash].[ext]',
    'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
  ],

  options: {
    query: {
      mozjpeg: {
        progressive: true
      },
      gifsicle: {
        interlaced: true
      },
      optipng: {
        optimizationLevel: 7
      }
    }
  }
}
    ]
  }
}

but i still get these warnings

    WARNING in ./public/imgs/common/timeline/timeline.png
DEPRECATED. Configure gifsicle's interlaced option in its own options. (gifsicle.interlaced)


    WARNING in ./public/imgs/common/xeditable/loading.gif
DEPRECATED. Configure gifsicle's interlaced option in its own options. (gifsicle.interlaced)

how do i fix this?I looked at github url also, its same answer which i applied.but doesnt work.

Community
  • 1
  • 1
Ankur Sharma
  • 415
  • 1
  • 7
  • 22
  • 1
    Possible duplicate of [Webpack 2: WARNING in .png, .svg, .. DEPRECATED. Configure optipng's optimizationLevel option in it's own options. (optipng.optimizationLevel)](http://stackoverflow.com/questions/42206190/webpack-2-warning-in-png-svg-deprecated-configure-optipngs-optimizatio) – Alf Apr 07 '17 at 14:38

2 Answers2

1

I flagged this question as a duplicate, but until it’s reviewed, have a look at Webpack 2: WARNING in .png, .svg, .. DEPRECATED. Configure optipng's optimizationLevel option in it's own options. (optipng.optimizationLevel).

Community
  • 1
  • 1
Alf
  • 1,414
  • 1
  • 15
  • 27
-1
loaders: [
   'file?hash=sha512&digest=hex&name=[hash].[ext]',
   'image?{bypassOnDebug:true, optipng:{optimizationLevel:7}, gifsicle:{interlaced:false}}'
]
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
pei
  • 11
  • 2
  • Welcome to Stack Overflow! It would be helpful if you edited your answer to add an explanation of how your code works. – jkdev Jul 19 '18 at 04:04