Hello! I’m trying to ask for help regarding my project that works locally but once I built it using Netlify, it wouldn’t work. any help with be appreciated!
I am trying to redirect from my index.html to another page called watchlist.html, but since on my index.js I am using document.addEventListener, it made everything listens to a “click”. so my html anchor tags wouldn’t work anymore, so I had to give my anchor tag a data-attribute and made JS to listen for an element being clicked with the similar attribute that once clicked it will redirect to watchlist.html using window.location.href. The problem is I have already provided the exact link to it but still giving me the “redirecting to a broken link” problem…
here is what my files look like, just in case you can’t open the files still. by opening the project, it seems like it can’t detect the images from the images folder either.
I went and did what you told me to do and revisited VITE documentation. I was able to make my images appear by importing them, and was able to make my Javascript work.
what I really can’t figure out is the redirecting to watchlist.html
I build it locally using Vite and you’re right! it is not building watchlist.html and watchlist.js
I also fixed the camel case problem “watchList.html” to “watchlist.html”
what exactly is the reason why this is happening and how can I fix it?
Thank you again Nathan! you’ve been very patient and helpful!