From 004667b80b939f802ba42f6624cd658eedc30eff Mon Sep 17 00:00:00 2001 From: David Lechner Date: Tue, 22 Nov 2022 13:48:14 -0600 Subject: [PATCH] webpack: finish TODO about avif file types was fixed in https://github.com/jshttp/mime-db/commit/65f65eda094a8ec206f9144584657ff14fd597ab --- config/webpack.config.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/config/webpack.config.js b/config/webpack.config.js index 4dcb8001..d47d3528 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -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: {