mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-20 16:30:34 +00:00
Update vite config for tamagui
This commit is contained in:
parent
5cddc47a65
commit
130a253024
@ -1,7 +1,41 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { tamaguiPlugin } from '@tamagui/vite-plugin';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
})
|
||||
plugins: [react(), tamaguiPlugin({
|
||||
config: './tamagui.config.ts',
|
||||
components: ['tamagui'],
|
||||
}),
|
||||
// optional, adds the optimizing compiler:
|
||||
// tamaguiExtractPlugin(tamaguiConfig),
|
||||
],
|
||||
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: {
|
||||
alias: {
|
||||
'react-native': 'react-native-web',
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
resolveExtensions: [
|
||||
'.web.js',
|
||||
'.web.ts',
|
||||
'.web.tsx',
|
||||
'.js',
|
||||
'.jsx',
|
||||
'.json',
|
||||
'.ts',
|
||||
'.tsx',
|
||||
'.mjs',
|
||||
],
|
||||
loader: {
|
||||
'.js': 'jsx',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user