Vite + Three.js + TypeScript project works with npm run dev, but breaks on GitHub Pages. Need help deploying.

Vite + Three.js + TypeScript project works with npm run dev, but breaks on GitHub Pages. Need help deploying.

Hey all,
I’m currently working on a project using 3 JS, White, and type script. I want to make it a published website, and I’m using gut hub pages as a hosting platform. When I run the NPM, everything works exactly, but when I try to run the NPM run run preview, or when I deploy it to Gut Hub Pages, it just shows a white canvas.
When I open the browser console (F12), I have a 404 mistake saying that it cannot find my main dot TS file.
What I have made so far is it:
I added this line in my package. JSON: “Homepage”: “https://kuuudo.github.io/robeterrante/β€œ
I also updated to add vite.config.js: Base: ‘/Robratrint/’,
But none of this fixes the problem.
I also have a mobile dot TS file that should be loaded instead of Main DotS on the detection of a mobile device, but I have not received that share to work in the version deployed.
Also, just one head – this is my first website project, and I probably put a lot of unnecessary files in the SRC folder. There are files such as car dot ts, box dot ts, EVETS, folocam dot ts, game ts, keyboard dot ts, man dot js, other man dot ts, and some others, and some other people are also afraid to delete honestly, if they break something.
Any idea what can I lose? I will really appreciate your help!

πŸ”— direct website:
πŸ‘‰ πŸ‘‰ https://kuuudo.github.io/robeterrante/
πŸ’» Gut Hub Ripozetry:
πŸ‘‰ πŸ‘‰ https://github.com/kuuuudo/ROrBERTERRANTE
Any idea what can I lose? I will really appreciate your help!

Vite + Three.js + TypeScript project works with npm run dev, but breaks on GitHub Pages. Need help deploying.

Image detail

Unlock Your Business Potential with Stan Jackowski Designs

At Stan Jackowski Designs, we bring your ideas to life with cutting-edge creativity and innovation. Whether you need a customized website, professional digital marketing strategies, or expert SEO services, we’ve got you covered! Our team ensures your business, ministry, or brand stands out with high-performing solutions tailored to your needs.

πŸš€ What We Offer:

  • Web Development – High-converting, responsive, and optimized websites
  • Stunning Design & UI/UX – Eye-catching visuals that enhance engagement
  • Digital Marketing – Creative campaigns to boost your brand presence
  • SEO Optimization – Increase visibility, traffic, and search rankings
  • Ongoing Support – 24/7 assistance to keep your website running smoothly

πŸ”Ή Take your business to the next level! Explore our outstanding services today:
Stan Jackowski Services

πŸ“ Located: South of Chicago

πŸ“ž Contact Us: https://www.stanjackowski.com/contact

πŸ’‘ Bonus: If you’re a ministry, church, or non-profit organization, we offer specialized solutions, including website setup, training, and consultation to empower your online presence. Book a FREE 1-hour consultation with Rev. Stanley F. Jackowski today!

πŸ”₯ Looking for a done-for-you autoblog website? We specialize in creating money-making autoblog websites that generate passive income on autopilot. Let us handle the technical details while you focus on growth!

πŸ“© Let’s Build Something Amazing Together! Contact us now to get started.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Most Popular

Daily Newsletter

Get all the top stories from Blogs
to keep track.

Social Media

Facebook
Twitter
LinkedIn
WhatsApp
Tumblr