-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix web-wagmi
build
#416
Fix web-wagmi
build
#416
Conversation
|
This pull request has been linked to 1 task:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
build:with-packages
script to web-wagmi
web-wagmi
build
@@ -1,39 +1,21 @@ | |||
import { useWalletLogin, useWalletLogout } from '@lens-protocol/react-web'; | |||
import { useEffect } from 'react'; | |||
import toast from 'react-hot-toast'; | |||
import { useAccount, useConnect, useDisconnect } from 'wagmi'; | |||
import { InjectedConnector } from 'wagmi/connectors/injected'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplifying next.js
example given it was anyway broken as was using the older wagmi 0.x
. We anyway have wagmi integration inside web-wagmi
so to simplify maintenance this is using now just in memory signer as the react-native
example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, thanks!
@@ -15,7 +16,7 @@ | |||
"tsc": "tsc --noEmit" | |||
}, | |||
"dependencies": { | |||
"@bundlr-network/client": "^0.10.3", | |||
"@bundlr-network/client": "^0.11.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to upgrade bundler due to some heresy in build pipline.
vitejs/vite#9703
Older @bundlr-network/client
was using near-api-js
which is probably wrongly published and was causing build failures for production web-wagmi
deployment.
"typescript": "^4.9.5", | ||
"vite": "^4.1.3", | ||
"vite-plugin-node-polyfills": "^0.7.0" | ||
"vite": "^4.4.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While trying fix the error mentioned above also upgraded vite to the latest, didn't resolve the issue but anyway it's better to have the latest one in use.
@@ -11,19 +11,4 @@ export default defineConfig({ | |||
nodePolyfills({ protocolImports: true }), | |||
visualizer({ open: true }) as PluginOption, | |||
], | |||
|
|||
build: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplifying, for example app it's not needed
@@ -3,8 +3,9 @@ | |||
"private": true, | |||
"version": "0.1.0", | |||
"scripts": { | |||
"build:with-packages": "turbo run build --filter=...example-wagmi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does --filter=...example-wagmi
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds all dependencies of the example-wagmi
inside monorepo, we could also build the whole monorepo but this one is better as only builds what example-wagmi
is actually using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
@@ -1,39 +1,21 @@ | |||
import { useWalletLogin, useWalletLogout } from '@lens-protocol/react-web'; | |||
import { useEffect } from 'react'; | |||
import toast from 'react-hot-toast'; | |||
import { useAccount, useConnect, useDisconnect } from 'wagmi'; | |||
import { InjectedConnector } from 'wagmi/connectors/injected'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, thanks!
@@ -0,0 +1,21 @@ | |||
// This is NOT PRODUCTION READY implementation of the EOA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to show usage of the SDK without wagmi
👍
}, | ||
|
||
define: { | ||
'process.env': {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@desfero did we check metadata upload via WebBundlr works still? This line and the use of nodePolyfills
plugin were needed to make WebBundlr
works on browsers.
No description provided.