arnoson / kirby-vite-multi-page-kit

A multi-page Kirby CMS + Vite starter kit
MIT License
37 stars 6 forks source link

Vite client constantly pings with a 404 because it tries to ping my local ddev-domain #8

Closed tpinne closed 1 year ago

tpinne commented 2 years ago

Hi,

first of all I very much like the integration between Kirby and Vite. The only thing that's "not working" or is a bit annoying, that the vite client constantly tries to ping from my local ddev-domain instead of localhost:3000. Therefore always getting a 404 and tries until the dev server comes back. But obiviously it is running but not reachable from there.

I already tried to set the HMR options with no luck.

server: {
      // Only important if you use a non-localhost php server, like laravel valet:
      cors: true,
      hmr: {
        host: 'localhost',
        port: 3000,
      },
      port: 3000,
      strictPort: true
    },

Do you have any suggestions how to tackle this?

arnoson commented 2 years ago

Hey, I'm not using ddev (using valet for now) so I'm not sure why this is happening. Do you have the same issues with a normal vite + php/traditional backend setup or is this something specific to this plugin?

arnoson commented 1 year ago

I'm using ddev myself now and everything works as expected. Feel free to reopen this issue if you can provide more information