nimbus-gui/vite.config.ts
Rickard Andersson 3878f0aa6b ci: make build work
This involved adding more react native stuff instead of removing, which
I'm not super happy about.
2023-08-07 11:36:15 +03:00

28 lines
676 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
const extensions = ['.web.js', '.web.ts', '.web.tsx', '.js', '.jsx', '.json', '.ts', '.tsx', '.mjs']
export default defineConfig({
plugins: [react()],
define: {
DEV: `${process.env.NODE_ENV === 'development' ? true : false}`,
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.TAMAGUI_TARGET': JSON.stringify('web'),
},
resolve: {
extensions,
alias: {
'react-native': 'react-native-web',
},
},
optimizeDeps: {
esbuildOptions: {
resolveExtensions: extensions,
loader: {
'.js': 'jsx',
},
},
},
})