This commit is contained in:
Georges KABBOUCHI 2022-10-17 15:08:56 +03:00
commit 1fd4eebfad

View File

@ -75,12 +75,28 @@ yarn add @instadapp/vue-web3-nuxt -D
``` ```
```ts ```ts
// nuxt.config.ts
export default defineNuxtConfig({ export default defineNuxtConfig({
modules: [ modules: [
'@instadapp/vue-web3-nuxt' '@instadapp/vue-web3-nuxt'
], ],
web3 :{
autoImport: false, // default `true`
}
}) })
``` ```
If you disabled `@instadapp/vue-web3-nuxt` auto import:
```ts
//composables/useWeb3.ts
import Web3 from "web3";
// import { Web3Provider } from "@ethersproject/providers";
import { useWeb3 as useWeb3Generic } from "@instadapp/vue-web3";
const useWeb3 = () => useWeb3Generic<Web3>();
// const useWeb3 = () => useWeb3Generic<Web3Provider>();
export { useWeb3 };
```
<br /> <br />
--- ---