@@ -76,17 +76,19 @@ The following tokens are replaced in the `name` parameter:
76
76
- ` [contenthash] ` the hash of ` options.content ` (Buffer) (by default it's the hex digest of the ` xxhash64 ` hash)
77
77
- ` [<hashType>:contenthash:<digestType>:<length>] ` optionally one can configure
78
78
- 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 `
80
80
- and ` length ` the length in chars
81
81
- ` [hash] ` the hash of ` options.content ` (Buffer) (by default it's the hex digest of the ` xxhash64 ` hash)
82
82
- ` [<hashType>:hash:<digestType>:<length>] ` optionally one can configure
83
83
- 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 `
85
85
- and ` length ` the length in chars
86
86
- ` [N] ` the N-th match obtained from matching the current file name against ` options.regExp `
87
87
88
88
In loader context ` [hash] ` and ` [contenthash] ` are the same, but we recommend using ` [contenthash] ` for avoid misleading.
89
89
90
+ ` digestType ` with ` base64safe ` don't contain ` / ` , ` + ` and ` = ` symbols.
91
+
90
92
Examples
91
93
92
94
``` javascript
@@ -157,7 +159,7 @@ const digestString = loaderUtils.getHashDigest(
157
159
158
160
- ` buffer ` the content that should be hashed
159
161
- ` 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 `
161
163
- ` maxLength ` the maximum length in chars
162
164
163
165
## License
0 commit comments