spa-github-pages icon indicating copy to clipboard operation
spa-github-pages copied to clipboard

Assets 404 not found with Vite + React Router

Open lightzane opened this issue 11 months ago • 0 comments

Issue Using Vite with React Router is loading the assets folder from the deep routes

Steps to Reproduce:

  1. Navigate to frontend "/example/deep/again?something=123
  2. Refresh the page

Expected: Navigates successfully to https://.github.io//example/deep/again without any error

Actual: Navigated successfully to https://.github.io//example/deep/again as blank page WITH errors (This is assumed to be the blank 404.html that was loaded)

Error in browser console: https://.github.io//example/deep/assets/index-[hash].css (404 NOT FOUND) https://.github.io//example/deep/assets/index-[hash].js (404 NOT FOUND)

lightzane avatar Mar 24 '24 00:03 lightzane