You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the web3-react library with Vite. It requires some shims, which I've successfully added. When running in development mode, the library works fine, while in a production build, we get:
ReferenceError: require is not defined
at index.6c14cda2.js:11138
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Which strangely has imports and requires coexisting. This may not be a Vite issue, but if there's anything I can do in Vite to work around it it'd be good to know about.
TypeError: brorand.Rand is not a constructor
at new MillerRabin$2 (index.85c518f5.js:22986)
at index.85c518f5.js:23075
(anonymous) @ index.cfdc00a0.js:20
I think this is a circular dependency issue.
I think the only problems here are not Vite problems but just known behaviour of Rollup, so I'm going to close this issue.
Describe the bug
I'm trying to use the web3-react library with Vite. It requires some shims, which I've successfully added. When running in development mode, the library works fine, while in a production build, we get:
Reproduction
https://github.com/CoinageCrypto/vite-web3-react-reproduction
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: