-
-
Notifications
You must be signed in to change notification settings - Fork 384
add support for webpack's new contenthash support #59
New issue
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
Conversation
src/index.js
Outdated
if (typeof contentHash[chunkId] === 'string') { | ||
shortContentHashMap[chunkId] = contentHash[ | ||
chunkId | ||
].substr(0, length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.slice
or .substring
? .substr
is Annex B so it'd be better to avoid it entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it to substring
.
@@ -0,0 +1 @@ | |||
.wX52cuPepLZcpDx5S3yYO { background: red; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The double hashes in the filename look scary 🤔
I assume that actual users will want to use [contenthash]
only instead of both [contenthash]
and [chunkhash]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes of course, this is just a test which tests both
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
====================================
Coverage 0% 0%
====================================
Files 3 3
Lines 157 180 +23
Branches 32 39 +7
====================================
- Misses 125 141 +16
- Partials 32 39 +7
Continue to review full report at Codecov.
|
Thanks for reviewing @Kovensky |
Could we have a release or prerelease for this? |
@Cryrivers There's a stable version now. Make sure to run a recent version of webpack for it to work. |
fixes #1