perf: only process images when building for production

This commit is contained in:
Sebin Nyshkim 2022-01-11 21:56:42 +01:00
parent d0b191706b
commit 3adbabc7da

View file

@ -51,6 +51,7 @@ module.exports = {
return args;
});
if (process.env.NODE_ENV === "production") {
config.module
.rule("images")
.test(/\.(png|jpe?g|gif|webp|svg)(\?.*)?$/i)
@ -72,5 +73,6 @@ module.exports = {
};
return { ...options, ...newOpts };
});
}
},
};