Hey everyone,
Iβm currently working on a project using Three.js, Vite, and TypeScript. I want to make it a published website, and Iβm using GitHub Pages as the hosting platform. Everything works perfectly when I run npm run dev, but when I try to run npm run preview, or when I deploy it to GitHub Pages, it just shows a blank (white) canvas.
When I open the browser console (F12), I get a 404 error saying it canβt find my main.ts file.
Hereβs what Iβve tried so far:
I added this line in my package.json: "homepage": "https://kuuudo.github.io/roberterrante/"
I also updated vite.config.js to include: base: '/roberterrante/',
But none of this seems to fix the issue.
I also have a mobile.ts file that should load instead of main.ts when a mobile device is detected, but I havenβt gotten that part to work in the deployed version either.
Also, just a heads up β this is my first website project, and I probably put too many unnecessary files in the src folder π
. There are files like car.ts, box.ts, eve.ts, followCam.ts, game.ts, keyboard.ts, main.js, othermain.ts, and a few others Iβm honestly too afraid to delete right now, in case they break something.
Any ideas what I might be missing? I'd really appreciate your help!
π Live website:
π https://kuuudo.github.io/roberterrante/
π» GitHub repository:
π https://github.com/kuuudo/roberterrante


Top comments (0)