我跟着这个帖子走
这是我的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
}
}
}
}
]
}
}但我还是收到了这些警告
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)我怎么解决这个问题呢?我也看了github的网址,同样的答案是I applied.but不起作用。
发布于 2017-04-07 22:39:45
发布于 2018-07-18 00:39:56
loaders: [
'file?hash=sha512&digest=hex&name=[hash].[ext]',
'image?{bypassOnDebug:true, optipng:{optimizationLevel:7}, gifsicle:{interlaced:false}}'
]https://stackoverflow.com/questions/43128564
复制相似问题