wakuconnect-chat-sdk/apps/web/vite.config.ts

37 lines
950 B
TypeScript
Raw Normal View History

2023-01-13 14:51:21 +00:00
import { tamaguiPlugin } from '@tamagui/vite-plugin'
2023-01-10 11:25:26 +00:00
import react from '@vitejs/plugin-react-swc'
2023-03-14 12:48:09 +00:00
import path from 'path'
2023-01-10 11:25:26 +00:00
import { defineConfig } from 'vite'
2023-01-11 13:38:47 +00:00
import type { PluginOption } from 'vite'
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,
}
2023-03-14 12:48:09 +00:00
// @see: https://vitejs.dev/config
2023-01-10 11:25:26 +00:00
export default defineConfig({
2023-03-14 12:48:09 +00:00
resolve: {
// mainFields: ['module', 'jsnext:main', 'jsnext'],
alias: {
'@status-im/components/hooks': path.resolve(
'../../packages/components/hooks'
),
'@status-im/components': path.resolve('../../packages/components/src'),
},
},
2023-01-10 11:25:26 +00:00
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
// tamaguiExtractPlugin(tamaguiConfig)
2023-01-11 13:38:47 +00:00
],
2023-01-10 11:25:26 +00:00
})