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: invalidate ssrError when HMR update occurs #8052

Merged
merged 1 commit into from
May 6, 2022

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented May 6, 2022

Description

When a module is invalidated for HMR we need to also invalidate mod.ssrError in order to allow the module to attempt to be re-executed.

Additional context

No


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

When a module is invalidated for HMR we need to also invalidate `mod.ssrError` in order to allow the module to attempt to be re-executed.
@patak-dev
Copy link
Member

For future reference, this is a regression we introduced in #7177. I'll cherry-pick this one in v2 so we can release a patch for 2.9.x

@patak-dev patak-dev merged commit c7356e0 into vitejs:main May 6, 2022
@patak-dev patak-dev added regression The issue only appears after a new release p3-minor-bug An edge case that only affects very specific usage (priority) feat: ssr labels May 6, 2022
@matthewp matthewp deleted the invalidate-ssr-error2 branch May 9, 2022 20:08
@patak-dev
Copy link
Member

@matthewp this PR has been included in vite@2.9.9

@matthewp
Copy link
Contributor Author

@patak-dev looks like I missed a spot :/. New PR to finish it up: #8124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants