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: serve 404.html also for SSR apps/frameworks #14837

Closed
wants to merge 2 commits into from

Conversation

brillout
Copy link
Contributor

@brillout brillout commented Oct 31, 2023

Description

Same logic as #14836.

Someone should run /ecosystem-ci run against this PR.

(I've made two PRs because I'm much less confident Vite's eco CI will be green for this PR.)


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 PR Title 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.

Copy link

stackblitz bot commented Oct 31, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

I don't think we can always handle 404s because in middlewareMode + appType: 'custom' combo, the consumer will be unable to create middlewares after Vite's middlewares with this PR.

@brillout
Copy link
Contributor Author

brillout commented Nov 1, 2023

AFAIK Vite doesn't have a middleware mode for the preview server.

@bluwy
Copy link
Member

bluwy commented Nov 1, 2023

Hmm right I forgot this is for preview only.

@bluwy
Copy link
Member

bluwy commented Nov 1, 2023

We talked about this today. Generally we're pretty indifferent, but since configurePreviewServer allows you to "fix" this today, aligning to the dev behaviour seems like the better option instead. If appType: 'custom' is configured, you would have to handle 404 in dev, so the same should also happen in preview too.

There's more discussed by I'll continue at #14836

@brillout brillout closed this Nov 2, 2023
@brillout brillout deleted the brillout/fix-preview-404 branch September 18, 2024 08:14
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.

2 participants