Skip to content

Commit a868114

Browse files
committed
WIP: Remove nodePolyfills plugin
1 parent 7348ae4 commit a868114

File tree

3 files changed

+2
-46
lines changed

3 files changed

+2
-46
lines changed

packages/react-native/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
"react-native": "0.72.4",
6262
"react-native-fetch-api": "^3.0.0",
6363
"rollup": "4.14.3",
64-
"rollup-plugin-node-polyfills": "^0.2.1",
6564
"text-encoding": "^0.7.0",
6665
"typescript": "^5.5.3",
6766
"web-streams-polyfill": "3.2.1"

packages/react-native/rollup.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import replace from '@rollup/plugin-replace';
77
import path from 'path';
88
import { fileURLToPath } from 'url';
99
import terser from '@rollup/plugin-terser';
10-
import nodePolyfills from 'rollup-plugin-node-polyfills';
1110

1211
const __filename = fileURLToPath(import.meta.url);
1312
const __dirname = path.dirname(__filename);
@@ -29,11 +28,11 @@ export default (commandLineArgs) => {
2928
// We do this so that we can inject on BSON's crypto usage.
3029
replace({
3130
'const { crypto } = globalThis;': '// removed crypto destructuring assignment from globalThis',
31+
"require('crypto').randomBytes;": 'nodejsMathRandomBytes; // removed crypto.randomBytes',
3232
delimiters: ['', ''],
3333
preventAssignment: true
3434
}),
3535
json(),
36-
nodePolyfills(),
3736
nodeResolve({
3837
preferBuiltins: false,
3938
}),

pnpm-lock.yaml

Lines changed: 1 addition & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)