2022-11-05 18:17:18 +03:00
|
|
|
import dns from 'node:dns'
|
|
|
|
|
2021-03-15 20:11:40 +03:00
|
|
|
import dotenv from 'dotenv'
|
2022-11-05 18:17:18 +03:00
|
|
|
import { defineConfig } from 'vite'
|
2023-05-14 18:23:17 +03:00
|
|
|
import react from '@vitejs/plugin-react'
|
2021-03-15 20:11:40 +03:00
|
|
|
|
|
|
|
dotenv.config()
|
|
|
|
|
2022-11-05 18:17:18 +03:00
|
|
|
dns.setDefaultResultOrder('verbatim')
|
|
|
|
|
2021-03-15 20:11:40 +03:00
|
|
|
// Map necessary Leon's env vars as Vite only expose VITE_*
|
|
|
|
process.env.VITE_LEON_NODE_ENV = process.env.LEON_NODE_ENV
|
|
|
|
process.env.VITE_LEON_HOST = process.env.LEON_HOST
|
|
|
|
process.env.VITE_LEON_PORT = process.env.LEON_PORT
|
|
|
|
|
2022-11-05 18:17:18 +03:00
|
|
|
export default defineConfig({
|
2021-03-15 20:11:40 +03:00
|
|
|
root: 'app/src',
|
|
|
|
build: {
|
|
|
|
outDir: '../dist',
|
|
|
|
emptyOutDir: true
|
2022-11-05 18:17:18 +03:00
|
|
|
},
|
|
|
|
server: {
|
|
|
|
port: 3000
|
2023-05-14 18:23:17 +03:00
|
|
|
},
|
|
|
|
plugins: [react()]
|
2022-11-05 18:17:18 +03:00
|
|
|
})
|