The [ext] portion of the query string you have mentioned is referring to the extension of the file.
This is actually not a feature of the loader itself, but rather a feature of all loaders via loader-utils
You can see as part of the documentation, that there are a variety of extra "string interpolation templates" that you can pass as a name property as part of the loader query.
The following tokens are replaced in the name parameter for any loader: (Also any time that resource is mentioned below, it means the fully resolved path of the file that the loader is operating on)
[ext] the extension of the resource
[name] the basename of the resource
[path] the path of the resource relative to the context query parameter or option.
[folder] the folder of the resource is in.
[emoji] a random emoji representation of options.content
[emoji:<length>] same as above, but with a customizable number of emojis
[hash] the hash of options.content (Buffer) (by default it's the hex digest of the md5 hash)
[<hashType>:hash:<digestType>:<length>] optionally one can configure
other hashTypes, i. e. sha1, md5, sha256, sha512
other digestTypes, i. e. hex, base26, base32, base36, base49, base52, base58, base62, base64
and length the length in chars
[N] the N-th match obtained from matching the current file name against options.regExp
The
[ext]
portion of the query string you have mentioned is referring to the extension of the file.This is actually not a feature of the loader itself, but rather a feature of all loaders via loader-utils
You can see as part of the documentation, that there are a variety of extra "string interpolation templates" that you can pass as a name property as part of the loader query.
The following tokens are replaced in the
name
parameter for any loader: (Also any time thatresource
is mentioned below, it means the fully resolved path of the file that the loader is operating on)[ext]
the extension of the resource[name]
the basename of the resource[path]
the path of the resource relative to thecontext
query parameter or option.[folder]
the folder of the resource is in.[emoji]
a random emoji representation ofoptions.content
[emoji:<length>]
same as above, but with a customizable number of emojis[hash]
the hash ofoptions.content
(Buffer) (by default it's the hex digest of the md5 hash)[<hashType>:hash:<digestType>:<length>]
optionally one can configureother
hashType
s, i. e.sha1
,md5
,sha256
,sha512
other
digestType
s, i. e.hex
,base26
,base32
,base36
,base49
,base52
,base58
,base62
,base64
and
length
the length in chars[N]
the N-th match obtained from matching the current file name againstoptions.regExp