Generated by Spark: The usual culprit (90% probability)

VITE_BASE_URL / VITE_PUBLIC_PATH (or equivalent)

Many templates do this in vite.config.ts:

base: import.meta.env.VITE_BASE_URL,

or:

base: process.env.VITE_BASE_URL,

If that variable:

is undefined

defaults to /

or was set to http://localhost:5000

then Vite bakes the wrong paths into the JS bundles.

nginx then serves files that point to nowhere → flaky load.
This commit is contained in:
2026-01-17 16:35:28 +00:00
committed by GitHub
parent ead06ea1fb
commit 9ada8f9d5f

View File

@@ -10,6 +10,7 @@ const projectRoot = process.env.PROJECT_ROOT || import.meta.dirname
// https://vite.dev/config/
export default defineConfig({
base: './',
plugins: [
react(),
tailwindcss(),