46 lines
985 B
TypeScript
46 lines
985 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
root: 'src',
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3001,
|
|
open: false,
|
|
middlewareMode: false,
|
|
hmr: {
|
|
protocol: 'ws',
|
|
host: '127.0.0.1',
|
|
port: 3001,
|
|
timeout: 60000,
|
|
},
|
|
maxRequestBufferSize: 102400,
|
|
keepAliveTimeout: 60000,
|
|
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,
|
|
},
|
|
})
|