Thank you for your replies. You were right to ask me to do a basic, minimal setup from scratch.
My setup had once run using browsersync. The problems started when I deinstalled it and switched completely to Vite. From that time I had code that I now deleted:
config.yaml
router_http_port: "80"
router_https_port: "443"
vite.config.yaml
import ViteRestart from 'vite-plugin-restart';
import mkcert from 'vite-plugin-mkcert'
export default defineConfig(({ command, mode }) => {
return {
plugins: [
mkcert(),
ViteRestart({
restart: [
'./src/**/*',
],
})
],
},
server: {
manifest: true,
https: true,
package.json
{
"devDependencies": {
"vite-plugin-mkcert": "^1.17.8",
"vite-plugin-restart": "^0.4.2"
}
}
I am thankful for your advice as I had spent more than a day on this problem. I’ll stick to your advice in future and start with a trivial setup when getting stuck.