Skip to content

fix: invalidate ssrError when HMR update occurs#8052

Merged
patak-cat merged 1 commit intovitejs:mainfrom
withastro:invalidate-ssr-error2
May 6, 2022
Merged

fix: invalidate ssrError when HMR update occurs#8052
patak-cat merged 1 commit intovitejs:mainfrom
withastro:invalidate-ssr-error2

Conversation

@matthewp
Copy link
Copy Markdown
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-cat
Copy link
Copy Markdown
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-cat patak-cat merged commit c7356e0 into vitejs:main May 6, 2022
@patak-cat patak-cat 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-cat
Copy link
Copy Markdown
Member

@matthewp this PR has been included in vite@2.9.9

@matthewp
Copy link
Copy Markdown
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