Skip to content

Commit 1ea869d

Browse files
committed
vite: add node-fetch-polyfill
1 parent 46664ce commit 1ea869d

File tree

3 files changed

+438
-350
lines changed

3 files changed

+438
-350
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
"classnames": "^2.5.1",
2121
"lodash": "^4.17.21",
2222
"lucid-cardano": "^0.10.7",
23+
"node-fetch-polyfill": "^2.0.6",
2324
"react": "^18.3.1",
2425
"react-dom": "^18.3.1",
2526
"react-icons": "^5.3.0",
2627
"use-clipboard-copy": "^0.2.0",
28+
"rollup-plugin-node-polyfills": "^0.2.1",
2729
"use-custom-compare": "^1.4.0",
2830
"usehooks-ts": "^3.1.0"
2931
},

vite.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ export default defineConfig({
2323
process.env.PERSISTENT_SESSION,
2424
),
2525
},
26+
resolve: {
27+
alias: {
28+
'node-fetch': 'node-fetch-polyfill',
29+
buffer: 'rollup-plugin-node-polyfills/polyfills/buffer-es6',
30+
},
31+
},
2632
});

0 commit comments

Comments
 (0)