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

feat: custom pushAssets function to control http2 push headers #4198

Merged
merged 1 commit into from Oct 26, 2018

Conversation

awronski
Copy link

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Resolves: #4011

Adds pushAssets(req, res, publicPath, preloadFiles) option to http2.
Function returns array of links. Now we can conditionally decide which assets we want to push.

Undocumented filter function shouldPush was marked as deprecated

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

LGTM. As this is almost a refactor i think we can add tests later.

@awronski
Copy link
Author

@pi0 I am thinking about removing publicPath from arguments of pushAssets(..). Because user has it in nuxt.config.js. What do you think?

@pi0
Copy link
Member

pi0 commented Oct 25, 2018

@awronski This value may be different. It should be read from client manifest to follow the value passed at compile time.

@pi0 pi0 merged commit c9fd780 into nuxt:dev Oct 26, 2018
@clarkdo
Copy link
Member

clarkdo commented Oct 26, 2018

Doc and release note need to be updated

@awronski awronski deleted the feat/push-headers branch October 27, 2018 06:27
@awronski
Copy link
Author

@clarkdo I will update docs

@lock
Copy link

lock bot commented Nov 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 26, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http2 push headers - should be a function
4 participants