Skip to content

fix(contenthash): do not generate mini-css contenthash for chunks without css modules #681

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

Closed
wants to merge 1 commit into from

Conversation

scinos
Copy link

@scinos scinos commented Jan 26, 2021

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Fixes #680

Breaking Changes

None

Additional Info

@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

Merging #681 (cca5496) into master (359c00f) will decrease coverage by 17.37%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #681       +/-   ##
===========================================
- Coverage   88.75%   71.38%   -17.38%     
===========================================
  Files          11       11               
  Lines         676      678        +2     
  Branches      184      184               
===========================================
- Hits          600      484      -116     
- Misses         73      178      +105     
- Partials        3       16       +13     
Impacted Files Coverage Δ
src/index.js 78.36% <100.00%> (-13.00%) ⬇️
src/CssLoadingRuntimeModule.js 0.00% <0.00%> (-97.06%) ⬇️
src/CssDependency.js 32.50% <0.00%> (-67.50%) ⬇️
src/utils.js 53.84% <0.00%> (-34.62%) ⬇️
src/CssModule.js 46.66% <0.00%> (-9.34%) ⬇️
src/loader.js 84.42% <0.00%> (-8.20%) ⬇️

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 359c00f...cca5496. Read the comment docs.

const modules = Array.from(
this.getChunkModules(chunk, chunkGraph)
).filter((module) => module.type === MODULE_TYPE);
if (modules.length) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use continue, it is faster, just put // eslint-ignore if linter will report about it (we need disable this rule, because we have more problems with it)

@alexander-akait
Copy link
Member

Thanks for the PR, I solved it with better perf, also found place there we can reduce runtime more, so it is only first place

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.

Produces bloated runtime in webpack 5 when using contenthash or chunkhash
2 participants