I am using vite,but on deployment there is nothing shows on any endpoint and also there is no error.
here is my git hub repo link:
Anyone who can guide me from beginning?
I am using vite,but on deployment there is nothing shows on any endpoint and also there is no error.
here is my git hub repo link:
Anyone who can guide me from beginning?
Hi there!
Add the base property in your vite.config.js file. This ensures your app’s paths are resolved correctly.
Open vite.config.js or vite.config.ts.
Set the base property to the name of your GitHub repository (with leading and trailing slashes).
Example:
import { defineConfig } from 'vite';
export default defineConfig({
base: '/your-repo-name/', // Replace 'your-repo-name' with your actual repository name
});
Thanks for helping but,
I have added the same but no improvement
Hi, checking your link in the Chrome console, I will get the following message:
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.
Can you check if your Vite config file includes the following?
export default defineConfig({
server: {
mimeTypes: {
js: 'application/javascript',
},
},
});
It’s a poke in the dark without the ability to test, but maybe we have the bug.
sorry but that also doesn’t work
Well at least you now know where the issue lies:
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
The JS module won’t load. Check the link. I couldn’t find the file it points to under src in your repo.