-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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: check if build exists so preview doesn't show 404s due to nonexistent build #10564
Conversation
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This slipped of my radar 😅 Should be a simple feature to merge
unfortunately this PR is a breaking change. Throwing an Error where there was none thrown before, and it breaks plugins using case in point: |
…how 404s due to nonexistent build (vitejs#10564)" This reverts commit 0a1db8c
…stent build (vitejs#10564) Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
…tejs#11335) fix(preview): Revert "fix: check if build exists so preview doesn't show 404s due to nonexistent build (vitejs#10564)" This reverts commit 0a1db8c
Description
Problem:
When running
vite preview
and no build has been made yet, then it will show 404s on all routes in the browser.Solution:
Error out if dir does not exist.
Displays an error like this if it does not exist:
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).