-
-
Notifications
You must be signed in to change notification settings - Fork 179
fix(index): reduce memory consumption (cacheKey.hash
)
#215
Conversation
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.
Nitpick && Questions
src/index.js
Outdated
@@ -160,7 +161,7 @@ class UglifyJsPlugin { | |||
'uglifyjs-webpack-plugin': versions.plugin, | |||
'uglifyjs-webpack-plugin-options': this.options, | |||
path: compiler.outputPath ? `${compiler.outputPath}/${file}` : file, | |||
input, | |||
inputHash: crypto.createHash('sha512').update(input).digest('hex'), |
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.
inputHash
=> hash
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.
What other algos besides sha512
are available? (the shortest possible should be the way to go imho)
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.
Should we serialize the options separately and hash them aswell ?
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.
webpack appears to use md5
for other modules - probably for speed.
Should we serialize the options separately and hash them aswell ?
Although the options could also be hashed, it may be easier to debug with a plain text prefix. A case could be made for either way.
cacheKey.hash
)
#214 landed |
Thanks @evilebottnawi. I have confirmed that this fixes the issue described in #216. |
76106ec
to
64bc841
Compare
@michael-ciniawsky friendly ping, change to md5 |
64bc841
to
e2c660a
Compare
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.
👍
Issues