Skip to content

Commit 5568f74

Browse files
committed
docs: removes incorrect info on readme
1 parent ce2a6c1 commit 5568f74

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,12 @@ yarn install buffer events
3737
bun install buffer events
3838
```
3939

40-
Then update your `vite.config.ts`:
40+
Then update your `vite.config.ts` to help the dev server reference the `buffer` polyfill:
4141

4242
```ts
4343
import { defineConfig } from "vite";
4444

4545
export default defineConfig({
46-
build: {
47-
target: "esnext",
48-
rollupOptions: {
49-
external: (id) => {
50-
const EXTERNAL_NODE_LIBS = ["crypto", "http", "https", "zlib", "url", "fs", "path", "os"];
51-
// Don't externalize buffer and events - we have polyfills
52-
return ["buffer", "events"].includes(id) ? false : EXTERNAL_NODE_LIBS.includes(id);
53-
},
54-
},
55-
},
5646
// When running your Vite dev server, you may see browser warnings regarding Buffer.
5747
// The optimizeDeps and resolve aliases for buffer should take care of them
5848
optimizeDeps: {
@@ -68,8 +58,6 @@ export default defineConfig({
6858
});
6959
```
7060

71-
This configuration ensures proper polyfills for Node.js modules that ethers and cryptographic dependencies rely on, while maintaining optimal bundle sizes for browser deployment. The `buffer` polyfill is essential for signature operations and cryptographic functions, while `events` enables proper event handling in browser environments.
72-
7361
## Usage
7462

7563
#### Browser Environment with Wallet Providers

0 commit comments

Comments
 (0)