Pārlūkot izejas kodu

add webpack / gatsby instructions to FAQ

Jordan Sexton 4 gadi atpakaļ
vecāks
revīzija
81e80d5cc5
1 mainītis faili ar 27 papildinājumiem un 1 dzēšanām
  1. 27 1
      FAQ.md

+ 27 - 1
FAQ.md

@@ -36,7 +36,33 @@ Yes, see the [angular](https://github.com/solana-labs/wallet-adapter/tree/master
 ### Vue / Vuex
 ### Vue / Vuex
 Not yet, see [issue #67](https://github.com/solana-labs/wallet-adapter/issues/67). Please contribute if you want to add Vue support!
 Not yet, see [issue #67](https://github.com/solana-labs/wallet-adapter/issues/67). Please contribute if you want to add Vue support!
 
 
-### Webpack / Babel / Rollup / Vite / Snowpack / esbuild
+### Webpack / Gatsby
+Yes, but you may need to set up polyfills for certain imported modules.
+
+For example, you may need to install `buffer`:
+```shell
+yarn add buffer
+```
+
+And configure `webpack.config.js`:
+```js
+const webpack = require('webpack');
+
+module.exports = {
+    plugins: [
+        new webpack.ProvidePlugin({
+            Buffer: ['buffer', 'Buffer']
+        })
+    ],
+    resolve: {
+        fallback: {
+            crypto: false
+        }
+    }
+};
+```
+
+### Babel / Rollup / Vite / Snowpack / esbuild
 Yes, but you may need to provide custom build configuration.
 Yes, but you may need to provide custom build configuration.
 Most of the packages are built using the TypeScript compiler, which outputs modular ES6 with `import`/`export` statements.
 Most of the packages are built using the TypeScript compiler, which outputs modular ES6 with `import`/`export` statements.