ArweaveKit in Browser Environments
Sample configurations needed for using ArweaveKit in Browser Environments
NextJS
NuxtJS
Setup
npm install --save-dev vite-plugin-node-polyfills
# or
yarn add --dev vite-plugin-node-polyfillsimport { nodePolyfills } from "vite-plugin-node-polyfills";
export default defineNuxtConfig({
// other configs
vite: {
plugins: [
nodePolyfills({
include: ["buffer", "crypto", "stream", "util", "vm"],
globals: {
process: false,
},
}),
],
resolve: {
alias: [
{
find: "ethers",
replacement:
"https://cdnjs.cloudflare.com/ajax/libs/ethers/6.7.0/ethers.min.js",
},
],
},
},
});
Vite
Setup
Webpack
Setup
Last updated
Was this helpful?