Skip to content

Commit

Permalink
expose rpc urls to next
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Dec 29, 2023
1 parent aed429c commit 4949dbe
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
// Expose RPC URLs to Next via `NEXT_PUBLIC_` prefix so we don't have to duplicate them
const rpcUrls = Object.entries(process.env)
.filter(([key, value]) => /^RPC_HTTP_URL_\d+$/.test(key))
.map(([key, value]) => [`NEXT_PUBLIC_${key}`, value]);

/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
...Object.fromEntries(rpcUrls),
},
webpack: (config) => {
// https://github.com/WalletConnect/walletconnect-monorepo/issues/1908
config.externals.push("pino-pretty", "lokijs", "encoding");
return config;
},
}
};

module.exports = nextConfig
module.exports = nextConfig;

0 comments on commit 4949dbe

Please sign in to comment.