Search code examples
reactjssafarivite

Site on React/Vite doens't work in Safari. (Browser shows empty page)


I use BrowserStack for testing my site on react 18/vite and when I test it in Safari 5.1 I can see only empty page. There are no any errors in console. (But site works correctrly in mobile safari) enter image description here

I don't use any polyfills because vite adds polyfills under the hood.

I tried to find information about this situation and didn't find anything.

I tested in dev and prod modes.

Is it possible that site works on mobile Safari but doesn't work on desktop safari? Or there is problem in BrowserStack?


Solution

  • Could confirm whether --force-local is in use with your BrowserStack Local Connection? For ref.: browserstack.com/docs/local-testing/binary-params

    With --force-local flag, all the network requests on the remote test device will resolve via your local network, and hence the localhost:8000 will be reachable on BrowserStack's remote test device.