-
Notifications
You must be signed in to change notification settings - Fork 20
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
Vite support #101
Comments
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
Hello, we couldn't find any workarounds to solve this issue with Vite 2.x and Vite 3.x. The only solution seems to upgrade to Vite 4.x |
Vite 3 (maybe 2) projects can use the define plugin in your vite.config.
Fixes things for when you are running
Still working on a full solution. I assume the real problem here is in WalletConnect. Barring that, it's better in perawallet/connect's rollup.config than in each of our projects. |
Vite 4 still had the problem for me. I found a solution that does not need
|
I believe upgrading from walletconnect v1 to v2 would fix this issue (as you can see by my mention). There seem to be lots of changes in v2! |
I was referred to this issue--I believe I may have found a workaround after much hair-pulling: index.html
As of right now, I have a web app working with Pera Connect & Defly Connect (which is a fork of Pera) using Vite 4.3.9 and SolidJS. Although I did try various Vite plugins, nothing would make both dev and build both work. Simply adding that bit into the html did, though. |
@SilentRhetoric Does |
@MacroChip Replacing index.ts:19 Uncaught ReferenceError: global is not defined |
for whomever still needs help w this one, we've successfully been using Pera in vue + vite webapps for a while now and just open-sourced a small package that helps manage wallet connections. check out any-wallet |
Please consider addressing these two closed issues:
#4
#3
Despite being resolved, peraconnect still doesn't work with vite and its due to walletconnect bug.
How to replicate?
ws does not work in the browser. Browser clients must use the native WebSocket object
Related issues
WalletConnect/walletconnect-monorepo#1062
The text was updated successfully, but these errors were encountered: