Files
Memoh/packages/web/vite.config.ts
T
2026-01-09 12:33:04 +08:00

31 lines
592 B
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { config } from 'dotenv'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath } from 'url'
config({
path: '../../.env',
})
const port = Number(process.env.WEB_PORT || 7003)
// https://vite.dev/config/
export default defineConfig({
plugins: [vue(), tailwindcss()],
server: {
port,
host: '0.0.0.0',
},
preview: {
port,
host: '0.0.0.0',
allowedHosts: true,
},
resolve: {
alias: {
'#': fileURLToPath(new URL('../ui/src', import.meta.url)),
},
},
})