Skip to content
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

2.6.0 Release polyfill guide #22

Open
xzilja opened this issue Jul 12, 2023 · 0 comments
Open

2.6.0 Release polyfill guide #22

xzilja opened this issue Jul 12, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@xzilja
Copy link
Contributor

xzilja commented Jul 12, 2023

Summary

Summary

2.6.0 removed polyfills as per release notes in https://github.com/WalletConnect/modal/releases/tag/2.6.0

If you happen to use something that requires these (usually in our cdn bundles), you can reference our previous implementation to see how this is done below. Make sure to polyfill before you import modal packages.

import { Buffer } from 'buffer'

if (typeof window !== 'undefined') {
  if (!window.Buffer) {
    window.Buffer = Buffer
  }
  if (!window.global) {
    window.global = window
  }
  if (!window.process) {
    window.process = { env: {} }
  }
}
@xzilja xzilja added the documentation Improvements or additions to documentation label Jul 12, 2023
@xzilja xzilja pinned this issue Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant