-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.ts
27 lines (26 loc) · 1001 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { TanStackRouterVite } from '@tanstack/router-vite-plugin';
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
console.log('app variant:', process.env.APP, `src/apps/${process.env.APP}/routes`);
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), TanStackRouterVite({ routesDirectory: `src/apps/${process.env.APP}/routes` })],
define: {
'import.meta.env.VITE_APP': JSON.stringify(process.env.APP)
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@redux-thunk-variant': path.resolve(__dirname, './src/apps/redux-thunk-variant'),
'@redux-saga-variant': path.resolve(__dirname, './src/apps/redux-saga-variant'),
'@react-hooks-variant': path.resolve(__dirname, './src/apps/react-hooks-variant'),
'@reatom-variant': path.resolve(__dirname, './src/apps/reatom-variant')
}
},
server: {
proxy: {
'/api': 'http://localhost:31299'
}
}
});