Dzoukr / SAFEr.Template

Strongly opinionated modification of amazing SAFE Stack Template for full-stack development in F#.
MIT License
107 stars 15 forks source link

Vite is reloading but not refreshing the browser #18

Open RicoSaupeBosch opened 1 year ago

RicoSaupeBosch commented 1 year ago

Hi

I am currently ran into that problem that I run "yarn run start". The page is coming up and after I change something in the code and vite is supposed to refresh the browser page nothing happens.

my vite.config.js

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

/** @type {import('vite').UserConfig} */
export default defineConfig({
    plugins: [react()],
    root: "./src/client",
    server: {
        port: 8080,
        proxy: {
            '/api': 'http://localhost:5011',
        }
    },
    build: {
        outDir: "public"
    }
})

package.json

"devDependencies": {
        "@vitejs/plugin-react": "^4.0.0",
        "autoprefixer": "^10.4.13",
        "postcss": "^8.4.20",
        "vite": "^4.3.9"
    },
    "dependencies": {
        "react": "^18.2.0",
        "react-dom": "^18.2.0",
        "use-sync-external-store": "^1.2.0",
        "tailwindcss": "^3.3.2",
        "daisyui": "^3.1.5",
        "fontawesome": "^5.6.3"
    }

first time start

image

after a change in the page

image

page reload seems to happen but the browser is not reflecting that change.

Am I using unsupported versions?

houstonhaynes commented 2 months ago

I'm seeing the same thing - trying to follow this https://github.com/Zaid-Ajaj/Feliz/issues/481 to see if it offers any clues