'How do you run a Sveltekit application with ngrok in dev?

I'm trying to use ngrok with Sveltekit's dev process.

This result in infinite reloads. I tried disabling hmr in svelte.config.js:

server: {
  hmr: false
}

Also tried to change port and host:

sever: {
  hmr: {
    clientPort: 443,
    host: <ngrok-host>
  }
}

But nothing helps - when visiting the client application it causes infinite reloads.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source