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: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ module.exports = {
114
114
+ alias: {
115
115
+ 'crypto': 'react-native-quick-crypto',
116
116
+ 'stream': 'readable-stream',
117
-
+ 'buffer': '@craftzdog/react-native-buffer',
117
+
+ 'buffer': 'react-native-quick-crypto',
118
118
+ },
119
119
+ },
120
120
+ ],
@@ -123,6 +123,8 @@ module.exports = {
123
123
};
124
124
```
125
125
126
+
> **Note:**`react-native-quick-crypto` re-exports `Buffer` from `@craftzdog/react-native-buffer`, so you can use either as the buffer alias. Using `react-native-quick-crypto` ensures a single Buffer instance across your app.
127
+
126
128
Then restart your bundler using `yarn start --reset-cache`.
1.**`global.Buffer`**: Via [`@craftzdog/react-native-buffer`](https://github.com/craftzdog/react-native-buffer).
55
+
1.**`global.Buffer`**: Re-exported from [`@craftzdog/react-native-buffer`](https://github.com/craftzdog/react-native-buffer). You can also import it directly: `import { Buffer } from 'react-native-quick-crypto'`.
56
56
2.**`global.crypto`**: Points to `QuickCrypto`.
57
57
3.**`global.process`**: Adds `process.nextTick` (mapped to `setImmediate`).
Copy file name to clipboardExpand all lines: docs/content/docs/introduction/complete-setup.mdx
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,14 +173,18 @@ module.exports = {
173
173
+ alias: {
174
174
+ 'crypto': 'react-native-quick-crypto',
175
175
+ 'stream': 'readable-stream',
176
-
+ 'buffer': '@craftzdog/react-native-buffer',
176
+
+ 'buffer': 'react-native-quick-crypto',
177
177
+ },
178
178
+ },
179
179
+ ],
180
180
...
181
181
],
182
182
};
183
183
```
184
+
185
+
<Callouttype="info">
186
+
`react-native-quick-crypto` re-exports `Buffer` from `@craftzdog/react-native-buffer`, so you can use either as the buffer alias. Using `react-native-quick-crypto` ensures a single Buffer instance across your app.
0 commit comments