webpack: finish TODO about avif file types

was fixed in https://github.com/jshttp/mime-db/commit/65f65eda094a8ec206f9144584657ff14fd597ab
This commit is contained in:
David Lechner
2022-11-22 15:56:56 -06:00
committed by David Lechner
parent efec127b8e
commit 004667b80b
+1 -13
View File
@@ -360,23 +360,11 @@ module.exports = function (webpackEnv) {
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
// TODO: Merge this config once `image/avif` is in the mime-db
// https://github.com/jshttp/mime-db
{
test: [/\.avif$/],
type: 'asset',
mimetype: 'image/avif',
parser: {
dataUrlCondition: {
maxSize: imageInlineSizeLimit,
},
},
},
// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
test: [/\.avif$/, /\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
type: 'asset',
parser: {
dataUrlCondition: {