Hi!
I’m trying to build a website using vite as module bundler using vanilla javascript and with the help of anime.js library .
it works just fine when i run the command npm run dev
,however when i tried deploying it using github pages the website came with only the html file .
i tried pranshing gh-pages with only the dist file and only use that but i got the same result .
also after i run npm run build
i tried opening the indx.html file using live server but that didn’t work as well .
on gitgub pages I’m getting an error message that says : { Loading module from “https://3xo13.github.io/assets/index.1e6917f6.js” was blocked because of a disallowed MIME type (“text/html”) },
and warning that says : { Loading failed for the module with source “https://3xo13.github.io/assets/index.1e6917f6.js” }.
and on my local server with live server im getting two error messages ,the first is just like the one above and the second is : { The resource from “http://127.0.0.1:5500/assets/index.da26ad8e.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff) }.
am i missing something or is there’s something that i need to learn first before atempting to deploy a website ?
PS: this is my first time working with vite.
link to the project on github:
https://github.com/3xo13/alpha-limit
link to the result on github pages :
https://3xo13.github.io/alpha-limit/