@@ -76,17 +76,19 @@ The following tokens are replaced in the `name` parameter:
7676- ` [contenthash] ` the hash of ` options.content ` (Buffer) (by default it's the hex digest of the ` xxhash64 ` hash)
7777- ` [<hashType>:contenthash:<digestType>:<length>] ` optionally one can configure
7878 - other ` hashType ` s, i. e. ` xxhash64 ` , ` sha1 ` , ` md4 ` (wasm version), ` native-md4 ` (` crypto ` module version), ` md5 ` , ` sha256 ` , ` sha512 `
79- - other ` digestType ` s, i. e. ` hex ` , ` base26 ` , ` base32 ` , ` base36 ` , ` base49 ` , ` base52 ` , ` base58 ` , ` base62 ` , ` base64 `
79+ - other ` digestType ` s, i. e. ` hex ` , ` base26 ` , ` base32 ` , ` base36 ` , ` base49 ` , ` base52 ` , ` base58 ` , ` base62 ` , ` base64 ` , ` base64safe `
8080 - and ` length ` the length in chars
8181- ` [hash] ` the hash of ` options.content ` (Buffer) (by default it's the hex digest of the ` xxhash64 ` hash)
8282- ` [<hashType>:hash:<digestType>:<length>] ` optionally one can configure
8383 - other ` hashType ` s, i. e. ` xxhash64 ` , ` sha1 ` , ` md4 ` (wasm version), ` native-md4 ` (` crypto ` module version), ` md5 ` , ` sha256 ` , ` sha512 `
84- - other ` digestType ` s, i. e. ` hex ` , ` base26 ` , ` base32 ` , ` base36 ` , ` base49 ` , ` base52 ` , ` base58 ` , ` base62 ` , ` base64 `
84+ - other ` digestType ` s, i. e. ` hex ` , ` base26 ` , ` base32 ` , ` base36 ` , ` base49 ` , ` base52 ` , ` base58 ` , ` base62 ` , ` base64 ` , ` base64safe `
8585 - and ` length ` the length in chars
8686- ` [N] ` the N-th match obtained from matching the current file name against ` options.regExp `
8787
8888In loader context ` [hash] ` and ` [contenthash] ` are the same, but we recommend using ` [contenthash] ` for avoid misleading.
8989
90+ ` digestType ` with ` base64safe ` don't contain ` / ` , ` + ` and ` = ` symbols.
91+
9092Examples
9193
9294``` javascript
@@ -157,7 +159,7 @@ const digestString = loaderUtils.getHashDigest(
157159
158160- ` buffer ` the content that should be hashed
159161- ` hashType ` one of ` xxhash64 ` , ` sha1 ` , ` md4 ` , ` md5 ` , ` sha256 ` , ` sha512 ` or any other node.js supported hash type
160- - ` digestType ` one of ` hex ` , ` base26 ` , ` base32 ` , ` base36 ` , ` base49 ` , ` base52 ` , ` base58 ` , ` base62 ` , ` base64 `
162+ - ` digestType ` one of ` hex ` , ` base26 ` , ` base32 ` , ` base36 ` , ` base49 ` , ` base52 ` , ` base58 ` , ` base62 ` , ` base64 ` , ` base64safe `
161163- ` maxLength ` the maximum length in chars
162164
163165## License
0 commit comments