36 lines
769 B
TypeScript
36 lines
769 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
root: 'src',
|
|
server: {
|
|
port: 3001,
|
|
open: false,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://flights.test.aeroflot.ru',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/flights': {
|
|
target: 'https://flights.test.aeroflot.ru',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@app': path.resolve(__dirname, './src/app'),
|
|
'@styles': path.resolve(__dirname, './src/styles'),
|
|
'@assets': path.resolve(__dirname, './src/assets'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: '../dist',
|
|
sourcemap: false,
|
|
},
|
|
})
|