Hello Guys! Im trying to deploy a React app with vite, using absolute paths. I use path aliases, like @/components/*. The vite config translate the “@” into “‘./src’”. It works like a charm in local, but when deplying in render Im getting this error:“Error: [vite:asset] Could not load /opt/render/project/src/src/assets/main_img.png (imported by src/pages/Home/Home.tsx): ENOENT: no such file or directory, open ‘/opt/render/project/src/src/assets/main_img.png’”. Where there is two src/ nested folders . I also tried to set @ to “.” in prod, but also get this error:" error during build: Preformatted textFeb 6 12:41:34 PMError: [vite:load-fallback] Could not load /opt/render/project/src/App (imported by src/main.tsx): ENOENT: no such file or directory, open '/opt/render/project". I really dont understand how to config and use absolute paths in render environment.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.