Skip to content

Commit e960a88

Browse files
committed
Image loader for webpack
1 parent 72bfdbb commit e960a88

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: webpack.config.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ module.exports = {
2121
//fonts
2222
{test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff"},
2323
{test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader"},
24+
{
25+
test: /\.(jpe?g|png|gif|svg)$/i,
26+
loaders: [
27+
'file?hash=sha512&digest=hex&name=[hash].[ext]',
28+
'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
29+
]
30+
}
2431
//uglify ignore
2532
// {
2633
// test: /.*\/app\/.*\.js$/,
@@ -41,7 +48,7 @@ module.exports = {
4148
"window.jQuery": "jquery",
4249
"root.jQuery": "jquery",
4350
"Hammer": "hammerjs"
44-
//jquery-hammerjs
51+
//jquery-hammerjs
4552
})
4653
//new webpack.optimize.UglifyJsPlugin({
4754
// //say no to yellow terminal after minify

0 commit comments

Comments
 (0)