-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari support <=13 is completely broken. #637
Comments
Could you try the latest release? It downgrades the bundle output to ES2018, which should also fix this. |
The question is what baseline target should be supported in packages. There's no definite answer to this. |
Fixed by #636 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We use react-intersection-observer in our NextJS app.
Recently, we discovered that our website is broken in all Safari browsers prior to iOS 13.4.
The root of the problem is that ES2020 features (such a
constructor
and()=>{}
syntax) are omitted in the production code.Browser: IOS Safari 13.4
Device: All IPhones
Testing source: Browserstack
Question is:
Is it expected behaviour to omit the latest ESM features in the react-intersection-observer?
If so, why is it not specified in the documentation?
For those who are looking for solution.
You can work around it by using the transpilePackages field in
next.config.js
.Screenshot below shows code included in our NextJS bundle.
![Screenshot 2023-06-28 at 14 15 11](https://private-user-images.githubusercontent.com/32598874/249445017-fbe9fed8-e58f-45ba-9dc4-29da523390d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1MzY0NTYsIm5iZiI6MTcxOTUzNjE1NiwicGF0aCI6Ii8zMjU5ODg3NC8yNDk0NDUwMTctZmJlOWZlZDgtZTU4Zi00NWJhLTlkYzQtMjlkYTUyMzM5MGQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI4VDAwNTU1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0NmQ2ZjY2NjVhNWYxM2I5NDJmNWFiNmQxMzA0YmY0MjNlYjg0M2MyODdjZGEwYThkMGZiZjEyMzQ4MjkxNzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7cweAJDnDySoWb7qUeJBy4OVcJug7kz5CEtlzhwszTw)
Screenshot of browser console.
The text was updated successfully, but these errors were encountered: