How to hide warnings in local builds?

Running with VS Code Live Server, I see these warnings when running a dist offline, is there a way to hide them?

Original Post on Discord

by user 103054507105067008

For this I was running the build as which is what the VS Code live server does by default so I checked all the .js files in the build and replaced"localhost") < 0 with"localhost") < 0 &&"") < 0

by user 103054507105067008

?noerrors is the url parameter to suppress them or call setAllowOverlayMessages to false

Is that just like setAllowOverlayMessages(false) in Start or Awake?

by user 103054507105067008

Just call it in global space :slightly_smiling_face:

To add to the direct answer Marcel already gave :slightly_smiling_face:

We recommend using a local server that actually supports HTTPS, the warning is totally valid (you won’t be able to use WebXR and also networking and other things that require HTTPS)

I believe you can also set up Live Server to use an existing SSL certificate - you can use the one that vite-plugin-mkcert creates on disk, for example