Loading module from my site was blocked because of a disallowed MIME type (“text/html”)

Hi, please help

I am trying to update my website danielcoder.dev, it is a vite-react-tsx application. When I run the command ‘netlify dev’, the website runs fine. When I use ‘netlify deploy’ or ‘netlify build’, I get this error message. I read this article, and did what they did to fix their problem, moving the other files in my src file. It did not work. I import the react pages by using:

<script type="module" src="/src/main.tsx"></script>

I tried reading this stack overflow post, and I tried adding

<base href=".">

to my index.html. It didn’t work.

If anyone has found a solutions to this problem, please let know. Also if you need any more information, please let me know. Thank you

I found the issue I did not specify dist

1 Like

Nice. glad you caught that and were able to resolve this issue.