fix: skip redirect and error fallback on middleware mode #4057
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When serving vite server as middleware mode with base, it can't be used with sub routes as the base middleware will always redirect
/
to the base.Consider
base
is set to/admin/
in the following examples.Neither of these usages work. I think the
baseMiddware
is more like a friendly guide and warning for standalone vite server but not actually for middleware mode. Skipped the middleware in this PR.Additional context
Current workaround:
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).