arnoson / kirby-vite

Use Kirby CMS together with Vite
MIT License
81 stars 7 forks source link

Hot reloading not working #16

Closed scsskid closed 1 year ago

scsskid commented 1 year ago

First, thanks for your work!

I updated to v3.0.0 and vite-plugin-kirby 0.1.3

Hot reloading does not work for me, I tried also with kirby-vite-basic-kit 2.0.0

Editing `src/index.js? results in a full page reload in the basic-kit

I just cloned the kit repo and there is no other php server oder vite devserver running.

Can you reproduce?

arnoson commented 1 year ago

Hot reloading only works if your code implements vite's HMR API, although this API is meant for frameworks (vue, svelte, ...) and doing this for vanilla js is propably overkill. kirby-vite only supports live reloading, except for styles, where it is much easier to hot reload and vite just injects the new styles.

scsskid commented 1 year ago

got it, thanks