File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,17 @@ module.exports = function (webpackEnv) {
379
379
// match the requirements. When no loader matches it will fall
380
380
// back to the "file" loader at the end of the loader list.
381
381
oneOf : [
382
+ // TODO: Merge this config once `image/avif` is in the mime-db
383
+ // https://github.com/jshttp/mime-db
384
+ {
385
+ test : [ / \. a v i f $ / ] ,
386
+ loader : require . resolve ( 'url-loader' ) ,
387
+ options : {
388
+ limit : imageInlineSizeLimit ,
389
+ mimetype : 'image/avif' ,
390
+ name : 'static/media/[name].[hash:8].[ext]' ,
391
+ } ,
392
+ } ,
382
393
// "url" loader works like "file" loader except that it embeds assets
383
394
// smaller than specified limit in bytes as data URLs to avoid requests.
384
395
// A missing `test` is equivalent to a match.
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ declare namespace NodeJS {
9
9
}
10
10
}
11
11
12
+ declare module '*.avif' {
13
+ const src : string ;
14
+ export default src ;
15
+ }
16
+
12
17
declare module '*.bmp' {
13
18
const src : string ;
14
19
export default src ;
You can’t perform that action at this time.
0 commit comments