404 Error: HTML file of React project final build cannot find model variable

I am making a React project with Vite. In my html file, I have this:
stlLoader.load('/src/assets/model.stl')

This works perfectly fine in the dev environment. However, when I build the project (npm run build), I guess everything gets packed up and changed to weird letters and variables, so the script in my html file cannot find the “/src/assets/model.stl”. Instead, I get a 404 not found.

I am looking for a way to be able to load this model in my html file in my final build. Any help would be appreciated. 🙂