1

Does the WalletConnectButton work with vite? Everything seems to work fine in dev, but after build and deploy the button is disabled and does not allow me to connect.

This behavior is similar to what happens when a browser does not have a compatible wallet extension installed, but in this case, I have confirmed that the extension is installed and functioning in the browser.

import { nodePolyfills } from 'vite-plugin-node-polyfills';

export default defineConfig({
  plugins: [nodePolyfills({include: ['stream'], globals: {Buffer: true, process: true}})],
  build: {
    rollupOptions: {
      plugins: [
        nodePolyfills({
          include: ['stream'],
          globals: {
            Buffer: true,
            process: true,
          }
        })
      ]
    }
  }
});
1
  • Would be helpful if you could share your package versions Commented Jan 30 at 14:07

1 Answer 1

2

this works for me.

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [nodePolyfills(), react()],
})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.