Skip to content

Conversation

@jacob-ebey
Copy link

@jacob-ebey jacob-ebey commented Dec 22, 2020

Added query option that gets appended to the chunk href. This option can be a string or a
synchronous function.

This PR contains a:

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

Motivation / Use-Case

It is fairly common to append a query string to assets hosted on platforms like github-pages for cache invalidation. This change allows frameworks that pre-render HTML to append a query string while not loading duplicate chunks on the client.

Check the network log here for the problem: https://jacob-ebey.js.org/preact-webpack-prerender/

Breaking Changes

N/A

Additional Info

Added query option that gets appended to the chunk href. This option can be a string or a
synchronous function.
@codecov
Copy link

codecov bot commented Dec 22, 2020

Codecov Report

Merging #673 (8e79d68) into master (359c00f) will decrease coverage by 18.16%.
The diff coverage is 27.27%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #673       +/-   ##
===========================================
- Coverage   88.75%   70.59%   -18.17%     
===========================================
  Files          11       11               
  Lines         676      687       +11     
  Branches      184      190        +6     
===========================================
- Hits          600      485      -115     
- Misses         73      183      +110     
- Partials        3       19       +16     
Impacted Files Coverage Δ
src/CssLoadingRuntimeModule.js 0.00% <0.00%> (-97.06%) ⬇️
src/index.js 77.51% <50.00%> (-13.85%) ⬇️
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...8e79d68. Read the comment docs.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

@jacob-ebey
Copy link
Author

🤦that totally covers the use-case

@jacob-ebey jacob-ebey closed this Dec 22, 2020
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