I Built a MERN application and hosted the backend on Heroku, frontend on Netlify. On Localhost all the assets are loading fine and all pages work. Since my client is deployed on Netlify, my pages stop loading because of the MIME type, “text/html”, is not “text/css” error.
I’ve read a bit about it in here on the forum and tried out some fixes that are available here on the Netlify community/support but could not solve the issue.
Is there someone who can tell me what would be a appropriate configuration of my netlify.toml file to make sure the assets are loading and the error can be resolved? Or if it is another problem, please point me in the right direction!
The current configuration of my netlify.toml file is the following:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
It’s weird, I am testing now as well and the errors are gone. I did change a few things in my index.html and added netlify.toml instead of the _redirects file I used earlier. So it’s kinda hard to tell which solved the issue.
I need to defend my application for university next week and if this bug keeps messing up it will be kind of a disaster.
Is there anything more I can do to fix this for once and for all?
I tried on incognito browser tabs and even then the problem is there. Only a force reload is working to load my application but this is not the intention.
On localhost everything works perfectly fine so could it be possible to provide a solution for me?
I just opened your website and it seems to work fine. I’m not getting the errors you mentioned. Is there something specific that I can try to reproduce the behaviour or is it random?