Local HTTPS tunnel for mobile devices (ngrok etc.)

Ok, I made it work with this approach:

{
  "public": {
    "packages": {
      "dynamic-import": {
        "useLocationOrigin": true
      }
    }
  }
}

as described here:

You don’t even have to set the ROOT_URL for this.