Gltf file not loading in gh pages

Hello, I have working project locally (react vite three js fiber) and I wanted to upload it to gh-pages. So I started uploading everything but the gltf files are not working.

I have tried other object formats, path, etc. Nothing is working. Do you have an idea why the objects are not being rendered in gh pages? I’ve spent more than 7 hours trying to fix it :smiley: Thanks in advance.

The uploaded files to the network

you cant fetch from /src, in no bundler is this possible, everything inside /src is virtual and will later collapse into a single bundle. assets are stored in /public, say /public/model.glb, you then access it as “./model.glb”. the host doesn’t then matter much, you just copy the contents of your /dist folder whereever you must.

2 Likes