1

I have a problem with my Svelte project.

When I run npm run dev, my project displays correctly without any problems. However, when I try to deploy my project on GitHub Pages, I cannot see the rendering of my project. I get a blank page, and there is nothing in <div id="app"></div>.

I have been trying to figure this out for several days and have tried multiple deployment techniques, but I have been unable to display my project. (sorry for my bad english !)

My project is here : https://github.com/TamaraVioleau/CV-VioleauTamara

In my vite.config.js :

 `import { defineConfig } from 'vite' import { svelte } from
 '@sveltejs/vite-plugin-svelte'
 
 // https://vitejs.dev/config/ export default defineConfig({   base:
 "/cv-TamaraVioleau",   plugins: [svelte()], }) `

In my package.json :

  {
       "name": "my-app",
       "private": true,
       "version": "0.0.0",
       "type": "module",
       "scripts": {
         "dev": "vite",
         "build": "vite build",
         "preview": "vite preview",
         "deploy": "npx gh-pages -d dist"
       },
       "devDependencies": {
         "@sveltejs/vite-plugin-svelte": "^2.0.2",
         "gh-pages": "^5.0.0",
         "sass": "^1.58.3",
         "svelte": "^3.55.1",
         "vite": "^4.1.0"
       }
     }

Thank you for your help !

I tried with this tutorial : https://hrishikeshpathak.com/blog/svelte-gh-pages/

0 Answers0