The host: true is crucial and a valid value in Vite.
Now, since the kirby-vite plugin uses host to write down the server address to the .dev, the server address always landed as http://true:3000 in the .dev file.
That wasn't an issue in previous versions, as the mechanism wasn't the same.
To solve, I had to switch to host: "0.0.0.0".
I wondered if you could handle host: true automatically and set it to 0.0.0.0 in the .dev file.
I hesitated for a long time to update from version 1 to version 2 because it never worked out of the box. Now I finally found out why.
So, I'm using the following config in my Vite config to make my projects work inside Docker containers:
The
host: true
is crucial and a valid value in Vite.Now, since the kirby-vite plugin uses
host
to write down the server address to the.dev
, the server address always landed ashttp://true:3000
in the.dev
file.That wasn't an issue in previous versions, as the mechanism wasn't the same.
To solve, I had to switch to
host: "0.0.0.0"
.I wondered if you could handle
host: true
automatically and set it to0.0.0.0
in the.dev
file.