I download de Vue Metronic 8.2.3 Demo 1 and after run npn run build don't work with nginx I juste receveid error this messages:
1. Loading module from “http://vod.mydev.wtf/metronic8/vue/demo1/assets/index-9fb06229.js” was blocked because of a disallowed MIME type (“text/html”).
2. The stylesheet http://vod.mydev.wtf/metronic8/vue/demo1/assets/index-84c2bcbb.css was not loaded because its MIME type, “text/html”, is not “text/css”. vod.mydev.wtf
3. The stylesheet http://vod.mydev.wtf/metronic8/vue/demo1/splash-screen.css was not loaded because its MIME type, “text/html”, is not “text/css”. vod.mydev.wtf
My nginx conf file is:
server {
listen 80;
server_name vod.mydev.wtf;
root /var/www/vod/dist;
location / {
try_files $uri $uri/ /index.html;
}
types {
text/html html htm shtml;
text/css css;
application/javascript js;
}
}
Can you help me fix plz.
Right, I tried any methods but don't work... can you give me plz on nginx .conf file example for can I test?
Hi Alex,
Sorry for the late reply.
Unfortunately, we do not have any pre-build nginx configuration and it should be configurated according to your server's paths.
You can find some guidance on a fix in the StackOverflow question below.
https://stackoverflow.com/questions/59925804/blocked-because-of-a-disallowed-mime-type-text-html-angular-8-deployed-on
Regards,
Lauris Stepanovs,
Keenthemes Support Team
I changed the vite file config for start in "/" directory and work normally, thanks you for help.
Hi,
Glad to hear that. Please let us know if you have any additional questions on this topic or anything else.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Hi Alex Braz,
Thank you for reaching out to us.
We didn't manage to reproduce this error in the latest Metronic version.
You can find instructions on deploying Vue Vite application in official Vite docs: https://vitejs.dev/guide/static-deploy.
Please ensure that you build and deploy your application correctly.
Also, let us know if have made any changes to our codebase.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Right, I tried any methods but don't work... can you give me plz on nginx .conf file example for can I test?