mini-css-extract-plugin icon indicating copy to clipboard operation
mini-css-extract-plugin copied to clipboard

bug: add failing test for hashSalt in prod mode (realContentHash)

Open wejendorp opened this issue 4 years ago • 4 comments

This PR contains a:

  • [ ] bugfix
  • [ ] new feature
  • [ ] code refactor
  • [x] test update
  • [ ] typo fix
  • [ ] metadata update

Motivation / Use-Case

We noticed a bug with our bundles after adding salt values to the build.

Setting output.hashSalt together with optimization.realContentHash (e.g. prod mode) results in wrong urls for asset-modules, resulting in broken bundles.

The added test seems to be minimum to reproduce. For context (sanity check), the naming issue does not happen if the asset module is referenced from a js module instead.

Breaking Changes

None

Additional Info

This PR is just a bug report in the form of a failing test. I hope it can be useful to someone.

wejendorp avatar Jun 30 '21 21:06 wejendorp

Codecov Report

Merging #778 (b506919) into master (794b602) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #778   +/-   ##
=======================================
  Coverage   92.04%   92.04%           
=======================================
  Files           6        6           
  Lines         704      704           
  Branches      170      170           
=======================================
  Hits          648      648           
  Misses         53       53           
  Partials        3        3           

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 794b602...b506919. Read the comment docs.

codecov[bot] avatar Jul 01 '21 12:07 codecov[bot]

@wejendorp what is mini-css-extract-version?

alexander-akait avatar Jul 01 '21 12:07 alexander-akait

Yep, bug, we will try to fix it in near future

alexander-akait avatar Jul 01 '21 15:07 alexander-akait

Yep, bug, we will try to fix it in near future

Thank you for verifying @alexander-akait, let me know if I can help or anything.

wejendorp avatar Jul 02 '21 07:07 wejendorp