Skip to content

Conversation

@patak-dev
Copy link
Member

Description

See:

vite.middlewares is updated after a restart in middlewareMode: true. We need to recommend an indirection so users always get the latest middlewares, as proposed by @bluwy here

We could try to make vite.middlewares more magical and avoid reassigning in the future, but it isn't bad either that users know the middlewares change after a restart explicitly.


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, especially the Pull Request Guidelines.
  • 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).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@patak-dev patak-dev requested a review from bluwy November 9, 2023 08:09
@patak-dev patak-dev enabled auto-merge (squash) November 9, 2023 08:25
@patak-dev patak-dev disabled auto-merge November 9, 2023 08:53
@patak-dev patak-dev merged commit e49ef02 into main Nov 9, 2023
@patak-dev patak-dev deleted the docs/middlewares-in-ssr-after-restart branch November 9, 2023 08:53
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.

3 participants