We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
interpolateName
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loader-utils/lib/interpolateName.js
Line 94 in 489ef12
Regex fails for values like: [name].[md5:hash:base64:20].[ext]... getHashDigest() is called with a hashType = 'name].[md5'
[name].[md5:hash:base64:20].[ext]
getHashDigest()
hashType = 'name].[md5'
I suggest changing the regex to exclude closing brackets, like:
/\[(?:([^:\]]+):)?(?:hash||contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi ^^ added
The text was updated successfully, but these errors were encountered:
Another test case with CSS Module names:
v1.1.x version:
/\[(?:(\w+):)?hash(?::([a-z]+\d*))?(?::(\d+))?\]/ig.exec('[name]__modalTitle___[sha1:hash:hex:4]') ... [ 0: "[sha1:hash:hex:4]" 1: "sha1" 2: "hex" 3: "4" ]
v1.2.x version:
/\[(?:([^:]+):)?(?:hash||contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi.exec('[name]__modalTitle___[sha1:hash:hex:4]') ... [ 0: "[name]__modalTitle___[sha1:hash:hex:4]" 1: "name]__modalTitle___[sha1" 2: "hex" 3: "4" ]
Sorry, something went wrong.
Fixed in https://github.com/webpack/loader-utils/releases/tag/v1.2.2
Successfully merging a pull request may close this issue.
loader-utils/lib/interpolateName.js
Line 94 in 489ef12
Regex fails for values like:
[name].[md5:hash:base64:20].[ext]
...getHashDigest()
is called with ahashType = 'name].[md5'
I suggest changing the regex to exclude closing brackets, like:
The text was updated successfully, but these errors were encountered: