Skip to content
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

fix: remove the hash calculation if hash exists #159

Merged
merged 4 commits into from Mar 8, 2022
Merged

fix: remove the hash calculation if hash exists #159

merged 4 commits into from Mar 8, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 31, 2019

Remove the hash calculation and use the one already present in the compilation object (created in HtmlWebpackPlugin).

The hash option doesn't make sense because this plugin is used with HtmlWebpackPlugin and should inherit its option, not have a separate one. I can't think of a case where you would like different behavior (on hashes) for files included with this plugin.

Ivan Vasilov added 3 commits May 31, 2019 16:35
Remove the hash calculation and use the one already present in the `compilation` object (created in `HtmlWebpackPlugin`).
@SimenB
Copy link
Owner

SimenB commented Jun 3, 2019

Thanks! This makes sense to me, I didn't know a hash was included.

Could you add a test to fix test coverage? Just adding a hash property to the fake compilation object should be enough 🙂

@codecov-io
Copy link

codecov-io commented Jun 5, 2019

Codecov Report

Merging #159 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #159   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines          56     58    +2     
  Branches       13     14    +1     
=====================================
+ Hits           56     58    +2
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63e7fe8...b6d9dfe. Read the comment docs.

@ghost
Copy link
Author

ghost commented Jun 5, 2019

Could we remove the hash options and just let this plugin inherit the setting from the HtmlWebpackPlugin?

@ghost
Copy link
Author

ghost commented Jun 17, 2019

@SimenB what do you think about my proposal? ^

Base automatically changed from master to main February 20, 2021 09:16
@SimenB SimenB changed the base branch from main to hash-target March 8, 2022 07:47
@SimenB SimenB changed the title Remove the hash calculation fix: remove the hash calculation if hash exists Mar 8, 2022
@SimenB SimenB merged commit 716447d into SimenB:hash-target Mar 8, 2022
SimenB added a commit that referenced this pull request Mar 8, 2022
Co-authored-by: Ivan Vasilov <ivan@hfour.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants