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
Copy file name to clipboardExpand all lines: docs/src/routes/docs/[...1]overview/[...2]contribution-guide/+page.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ In order to contribute to the docs, create a PR on the [develop branch](https://
65
65
66
66
**Important note: The PR template docs checklist must be complete before review can take place.**
67
67
68
-
PRs for adding/updating a wallet should include a README (new or updated) for the package (located in `docs/src/routes/docs/[...4]wallets`), and adding/updating the module in [docs demo](https://github.com/blocknative/web3-onboard/blob/develop/docs/src/lib/services/onboard.js) and docs package (`docs/package.json`). New injected wallets should also add the wallet to the [natively supported injected wallets list](https://github.com/blocknative/web3-onboard/blob/develop/docs/src/routes/docs/%5B...4%5Dwallets/injected.md).
68
+
PRs for adding/updating a wallet should include a README (new or updated) for the package (located in `docs/src/routes/docs/[...4]wallets`), and adding/updating the module in [docs demo](https://github.com/blocknative/web3-onboard/blob/develop/docs/src/lib/services/onboard.js) and docs package (`docs/package.json`). New injected wallets should also add the wallet to the [natively supported injected wallets list](https://github.com/blocknative/web3-onboard/blob/develop/docs/src/routes/docs/wallets/injected.md).
69
69
70
70
[See here for an example of a docs pull request.](https://github.com/blocknative/web3-onboard/pull/1544/files)
[CRACO](https://www.npmjs.com/package/@craco/craco) provides a way to override webpack config which is obfuscated in Create React App built applications.
532
+
533
+
`npm i @craco/craco`
534
+
535
+
**OR**
536
+
537
+
`yarn add @craco/craco`
538
+
539
+
The above webpack 5 example can be used in the `craco.config.js` file at the root level.
540
+
541
+
```javascript title="craco.config.js"
542
+
constwebpack=require('webpack')
543
+
544
+
module.exports= {
545
+
webpack: {
546
+
configure: {
547
+
resolve: {
548
+
fallback: {
549
+
path:require.resolve('path-browserify')
550
+
},
551
+
alias: {
552
+
assert:'assert',
553
+
buffer:'buffer',
554
+
crypto:'crypto-browserify',
555
+
http:'stream-http',
556
+
https:'https-browserify',
557
+
os:'os-browserify/browser',
558
+
process:'process/browser',
559
+
stream:'stream-browserify',
560
+
util:'util'
561
+
}
562
+
},
563
+
experiments: {
564
+
asyncWebAssembly:true
565
+
},
566
+
plugins: [
567
+
newwebpack.ProvidePlugin({
568
+
process:'process/browser',
569
+
Buffer: ['buffer', 'Buffer']
570
+
})
571
+
]
572
+
}
573
+
}
574
+
}
575
+
```
528
576
529
-
[CRACO](https://www.npmjs.com/package/@craco/craco) provides a similar way to override webpack config which is obfuscated in Create React App built applications.
577
+
Be sure to update the scripts in package.json:
530
578
531
-
The above webpack 5 example can be used in the `craco.config.js` file at the root level in this case.
579
+
```
580
+
"scripts": {
581
+
"start": "craco start",
582
+
"build": "craco build",
583
+
"test": "craco test"
584
+
}
585
+
```
532
586
533
587
[React App Rewired](https://www.npmjs.com/package/react-app-rewired) is another option for working with Create React App DApps
534
588
589
+
Add React App Rewired:
590
+
591
+
`npm i react-app-rewired`
592
+
593
+
**OR**
594
+
595
+
`yarn add react-app-rewired`
596
+
535
597
Add the following dev dependencies:
536
598
`npm i --save-dev rollup-plugin-polyfill-node webpack-bundle-analyzer assert buffer crypto-browserify stream-http https-browserify os-browserify process stream-browserify util path-browserify browserify-zlib`
Import the libraries and any wallets you would like to use. For this example, we are going to use the injected wallets module. You can easily add more wallet support to your dapp via our other wallet modules. Additionally, we'll setup web3-onboard to support 2 chains: Ethereum mainnet and Polygon mainnet.
23
45
@@ -31,17 +53,16 @@ import keepkeyModule from '@web3-onboard/keepkey'
In another file we'll create the component that will display our connect wallet button. We'll be using the `useConnectWallet` hook in order to achieve this.
0 commit comments