Connect
Cometh ConnectCometh MarketplaceCometh Checkout
  • Demo
  • 🚀QUICKSTART
    • What is Connect
    • Getting started
    • Supported Networks
    • Connect 4337
  • ⚒️FEATURES
    • Create a wallet
    • Send transactions
    • Sign/Verify a message
    • Retrieve a wallet Address
    • Import a Safe wallet
    • Handle wallet owners
  • 🔌Integrations
    • Ethers
    • Wagmi - Viem
      • Viem
      • Wagmi
      • Wagmi + Rainbowkit
      • Wagmi + Web3modal
    • Unity
    • React issues
      • Vite
      • Create React App
  • 📖RESOURCES
    • FAQ
    • Advanced features
      • Add a new device
      • Recover users wallets
    • General concepts
      • Biometric signers
      • Multiple devices
      • Account Recovery
      • Gasless transaction
Powered by GitBook
On this page
  1. Integrations
  2. React issues

Vite

Process.env has been removed by Vite, for now you'll need to add this line to your config:

define: {
    'process.env': process.env
  }

Using a basic example, here is your vite.config.ts:

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

export default defineConfig({
  plugins: [react()],
  define: {
    'process.env': process.env
  }
})

Last updated 11 months ago

🔌