Skip to content

Commit

Permalink
polyfill fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daniserafs committed Mar 28, 2022
1 parent 68d65fc commit 8a2ba27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
10 changes: 1 addition & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simple DApp</title>
<script type="module">
import { Buffer } from "buffer";
import process from "process";
import util from "util";
window.global = window;
window.Buffer = Buffer;
window.process = process;
window.util = util;
</script>
<script type="module"></script>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "vite preview",
"format": "prettier -w ."
},
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import NodeGlobalPolyfillPlugin from "@esbuild-plugins/node-globals-polyfill";

// https://vitejs.dev/config/
export default defineConfig({
base: "./",
plugins: [react()],
resolve: {
alias: {
Expand Down

1 comment on commit 8a2ba27

@vercel
Copy link

@vercel vercel bot commented on 8a2ba27 Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.