how to correctly build three.js website to load STL Files

16 Views Asked by At

enter image description hereHi Community,

I am building a website with Three.js for viewing STL file. Initially, I successfully managed to run the website on my localhost, where STL files were loading and displaying correctly. However, I ran into issue: the STL files and canvas components are now missing without any error messages or warnings after npx vite build on live server.

I tried to rebuild project. I've also noticed that when running npx vite preview, the canvas appears but without the STL files.

Thanks.

I tried to rebuild project a few times. with npx vite build enter image description here

with npx vite preview enter image description here

0

There are 0 best solutions below