All checks were successful
Test CI / build (push) Successful in 15s
- 자동 로그인 cookie 로 개선
46 lines
1.0 KiB
TypeScript
46 lines
1.0 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
import * as fs from 'fs'
|
|
|
|
const certPath = path.resolve(__dirname, 'certs');
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 5185,
|
|
https: {
|
|
key: fs.readFileSync(path.join(certPath, 'localhost+2-key.pem')),
|
|
cert: fs.readFileSync(path.join(certPath, 'localhost+2.pem'))
|
|
},
|
|
proxy: {
|
|
'/local-api': {
|
|
target: 'https://localhost:3000',
|
|
secure: false,
|
|
ws: true,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/local-api/, ''),
|
|
},
|
|
'/dev-api': {
|
|
target: 'https://localhost:8088',
|
|
secure: false,
|
|
ws: true,
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/dev-api/, ''),
|
|
}
|
|
}
|
|
},
|
|
|
|
plugins: [
|
|
react(),
|
|
tailwindcss()
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src")
|
|
}
|
|
}
|
|
})
|