mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
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:
@@ -10,6 +10,7 @@ const projectRoot = process.env.PROJECT_ROOT || import.meta.dirname
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
plugins: [
|
||||
react(),
|
||||
tailwindcss(),
|
||||
|
||||
Reference in New Issue
Block a user