23 lines
442 B
JavaScript
23 lines
442 B
JavaScript
import { defineConfig } from 'vite'
|
|
import { resolve } from 'path'
|
|
|
|
const API_URL = process.env.API_URL ?? 'http://localhost:3000'
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__API_URL__: JSON.stringify(API_URL),
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
rollupOptions: {
|
|
input: {
|
|
main: resolve(__dirname, 'index.html'),
|
|
login: resolve(__dirname, 'login.html'),
|
|
},
|
|
},
|
|
},
|
|
})
|