I have a react typescript vite application.
the build and run commands are:
"build": "tsc && vite build",
"start:prod": "serve -s ./dist -p 8080"
locally it works just fine, no problem.
In the cloud (I am using openshift) it gives me the following error: Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
In openshift, I have an additional route for this microservice but I set the base in the vite.config.ts to be './' and it successfully gets the files from the server, but not in the right content-type. In the vite.config.ts I also set the resolve extensions but it didn't help.
Any idea what could cause this error?