{"version":3,"file":"vite-config.cjs","names":[],"sources":["../src/vite-config.ts"],"sourcesContent":["/**\n * EVM Adapter: Vite Configuration Export\n *\n * This module exports Vite configuration fragments for the EVM adapter.\n * Currently minimal, but provides a consistent interface for adapter-specific\n * build requirements.\n *\n * USAGE:\n * 1. In the main builder app: Import and merge into packages/builder/vite.config.ts\n * 2. In exported apps: The export system injects these configs when EVM is used\n *\n * See: docs/ADAPTER_ARCHITECTURE.md § \"Build-Time Requirements\"\n */\n\nimport type { UserConfig } from 'vite';\n\n/**\n * Returns the Vite configuration required for EVM adapter compatibility\n *\n * @returns Vite configuration object to be merged with your main vite.config\n *\n * @example\n * ```typescript\n * // vite.config.ts\n * import { getEvmViteConfig } from '@openzeppelin/adapter-evm/vite-config';\n *\n * export default defineConfig(({ mode }) => {\n *   const evmConfig = getEvmViteConfig();\n *\n *   return {\n *     plugins: [\n *       react(),\n *       ...evmConfig.plugins,\n *     ],\n *     resolve: {\n *       dedupe: [\n *         ...evmConfig.resolve.dedupe,\n *       ],\n *     },\n *   };\n * });\n * ```\n */\nexport function getEvmViteConfig(): UserConfig {\n  return {\n    // Currently no EVM-specific plugins required\n    plugins: [],\n\n    resolve: {\n      // Module Deduplication\n      // Ensure singleton instances of shared dependencies\n      dedupe: [\n        // EVM-specific dependencies that may need deduplication\n        'viem',\n        'wagmi',\n        '@wagmi/core',\n      ],\n    },\n\n    optimizeDeps: {\n      // Force pre-bundling of runtime wallet dependencies that are loaded lazily\n      // through wagmi/RainbowKit so dev mode gets stable ESM interop.\n      include: [\n        'wagmi',\n        '@wagmi/core',\n        '@wagmi/connectors',\n        'viem',\n        '@tanstack/react-query',\n        '@rainbow-me/rainbowkit',\n        '@metamask/sdk',\n        'debug',\n        'events',\n      ],\n      exclude: [],\n    },\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,mBAA+B;AAC7C,QAAO;EAEL,SAAS,EAAE;EAEX,SAAS,EAGP,QAAQ;GAEN;GACA;GACA;GACD,EACF;EAED,cAAc;GAGZ,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD;GACD,SAAS,EAAE;GACZ;EACF"}