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