Images are now production worthy

This commit is contained in:
2018-07-11 07:33:39 +10:00
parent 3a97513648
commit 8b7d74aaf4
2 changed files with 15 additions and 4 deletions

View File

@ -78,7 +78,7 @@ module.exports = function(server, app) {
},
{
test: /\.jpe?g$|\.gif$|\.png$|\.svg|\.webm|\.mp4$/i,
test: /\.svg|\.webm|\.mp4$/i,
use: [{
loader: "file-loader",
options: {
@ -88,6 +88,18 @@ module.exports = function(server, app) {
}]
},
{
test: /\.jpe?g$|\.gif$|\.png$/i,
use: [{
loader: "responsive-loader",
options: {
sizes: [128, 256, 500, 750, 1000, 1250, 1500, 2000, 2250, 2500],
name: "[path][name]_[width]x.[ext]",
context: 'public'
}
}]
},
{
test: /\.(eot|ttf|woff(2)?)(\?v=\d+\.\d+\.\d+)?/,
loader: 'url-loader'