question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] iOS Safari <= 14.4 doesnt support private class instance fields

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

wagmie-core 0.1.15

Current Behavior

Safari iOS doesnt support private instance fields in a class, this causes an exception on devices due to the # character.

Expected Behavior

Ideally it would be transpiled and targeted at a lower version

Steps To Reproduce

No response

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tmmcommented, Mar 29, 2022

This should do it! Tested out with iOS 14.1 in the simulator.

https://github.com/tmm/wagmi/pull/292

1reaction
sammdeccommented, Mar 29, 2022

@tmm This works but looks like the code being generated is targeting some very old browsers it looks like even though ES2021 is target in typescript it is overwritten by the babel/preset-env plugin. For example Im seeing objectSpread polyfills and _asyncToGenerator polyfills. You might want to consider switching out targets: { esmodules: true } with a more targeted compile step.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript private class fields or methods not working in iOS ...
The good news is that Safari 15 on iOS 15 and macOS 12 supports private class methods and accessors, according to the official...
Read more >
"class fields" | Can I use... Support tables for HTML5, CSS3, etc
1 Doesn't support public static fields. See WebKit bug 194095. Support data for this feature provided by: MDN browser-compat-data.
Read more >
If Safari isn't loading websites or quits on your iPhone, iPad, or ...
If you can't load a website or webpage, or Safari quits unexpectedly, follow these steps.
Read more >
Latest News - Apple Developer
Learn about the latest technologies, events, and policies for developers.
Read more >
I get "Failed to prepare device fo… | Apple Developer Forums
When I go to Windows->"Devices and Simulators". I get: "Failed to prepare device for development." "If you are certain that Xcode supports development...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found