umi icon indicating copy to clipboard operation
umi copied to clipboard

Attempts to fix umi-bundle-defaults on Vite

Open 0xC0A1 opened this issue 5 months ago • 4 comments

Attempts to address:

https://github.com/metaplex-foundation/umi/issues/146 https://github.com/metaplex-foundation/umi/issues/147 https://github.com/metaplex-foundation/umi/issues/124

How to Reproduce

  1. Create a Vite React App:

    • Use the following command to create a new Vite React app:
      npm create vite@latest my-react-app --template react
      
    • Navigate to the project directory:
      cd my-react-app
      
    • Install dependencies:
      npm install
      
  2. Add Umi and Solana Wallet Adapter:

    • Install Umi and Solana wallet adapter packages:
      npm install @metaplex-foundation/umi @solana/wallet-adapter-react ...other wallet adapter deps
      
    • Install Umi bundle defaults:
      npm install @metaplex-foundation/umi-bundle-defaults
      
  3. Configure Umi and Solana Wallet:

    • Follow the Umi documentation to set up Umi and the Solana wallet adapter in your project. This typically involves:
      • Setting up the Umi provider.
      • Configuring the Solana wallet adapter.
      • Adding necessary imports and configuration code to adapt the wallet adapter for umi.
  4. Run the Application:

    • Start the Vite development server:
      npm run dev
      
    • Observe the application behavior. Issues should be apparent at this stage if you at least are instantiating the UMI wallet adapter and UMI overall (You won't get the error just by installing it, but on usage).
  5. Expected Outcome:

    • The application should integrate Umi and Solana wallet adapter correctly.
    • Any errors or issues should be logged in the console for further debugging.

0xC0A1 avatar Sep 13 '24 21:09 0xC0A1