My project contains multiple HTML files, including a jump relationship. When I upload the project to GitHub and then deploy it to Netlify, clicking the link in index.html will pop up an error message: Page Not Found.
When I looked at the file structure in Netlify’s folder, I found that many files were missing.
For the same project, if I upload it manually to Netlify, everything will run normally. Look at the file directory, there are also corresponding files. I don’t know why.
It then publishes the files in dist (which is the Publish directory):
This is all correct for a Vite based project, which builds into dist.
Your files are ‘missing’ but they’re not missing due to Netlify, it’s just what your build produces.
Uploading the source files directly is unfortunately a completely irrelevant comparison.
You should revisit the Vite documentation.
You’ll find that Vite doesn’t necessarily work how you currently believe that it does.
Thanks for this detailed instruction, I really appreciate that.
I don’t know much about how Vite works. I will take a look at the document link you provided. Thank you!