chore(webpack): optimize images

pull/2670/head
Chaim Lev-Ari 2018-12-03 13:21:30 +02:00
parent bd0fd358ce
commit 119391bb52
3 changed files with 1771 additions and 49 deletions

View File

@ -103,6 +103,7 @@
"gruntify-eslint": "^3.1.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"image-webpack-loader": "^4.5.0",
"load-grunt-tasks": "^3.5.2",
"lodash-webpack-plugin": "^0.11.5",
"mini-css-extract-plugin": "^0.4.4",

View File

@ -6,7 +6,7 @@ module.exports = webpackMerge(commonConfig, {
module: {
rules: [
{
test: /\.(woff|woff2|eot|ttf|svg|ico|png|jpg|gif)$/,
test: /\.(woff|woff2|eot|ttf|ico)$/,
use: [
{
loader: 'url-loader',
@ -14,6 +14,16 @@ module.exports = webpackMerge(commonConfig, {
}
]
},
{
test: /\.(gif|png|jpe?g|svg)$/i,
use: [
'file-loader',
{
loader: 'image-webpack-loader',
options: {}
}
]
}
]
}
});

1807
yarn.lock

File diff suppressed because it is too large Load Diff