Using the library with an SSR framework results in a build error: ReferenceError: self is not defined
I believe the error comes from the connex library which requires a reference to the global window instance on import. Maybe the issue should be moved to the connex package at your discretion.
Steps to reproduce
- Create a new Next.js project
- Install @vechain/dapp-kit-react
- Import any item from the package (you do not need to run any code, just importing is enough to break it)
- Run either
npm run build or npm run dev
Example
https://codesandbox.io/p/devbox/dapp-kit-nextjs-99tmxr
cc @GianBarGian