status-web/apps/vite/vite.config.ts

31 lines
725 B
TypeScript

// eslint-disable-next-line import/default
import tamagui from '@tamagui/vite-plugin'
import react from '@vitejs/plugin-react-swc'
import { defineConfig } from 'vite'
import type { PluginOption } from 'vite'
const { tamaguiPlugin } = tamagui
process.env.TAMAGUI_TARGET = 'web'
process.env.TAMAGUI_DISABLE_WARN_DYNAMIC_LOAD = '1'
const tamaguiConfig = {
components: ['@status-im/components'],
config: './tamagui.config.ts',
// useReactNativeWebLite: true,
}
// https://vitejs.dev/config
export default defineConfig({
define: {
TAMAGUI_TARGET: JSON.stringify('web'),
},
plugins: [
react(),
tamaguiPlugin(tamaguiConfig) as PluginOption,
// BUG
// tamaguiExtractPlugin(tamaguiConfig)
],
})