27 lines
793 B
TypeScript
27 lines
793 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'node:path'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue(),tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
host: true, // listen on 0.0.0.0 inside container
|
|
port: 5173,
|
|
// Allow the container DNS name and local access
|
|
allowedHosts: ['localhost', '127.0.0.1', 'web', 'nginx'],
|
|
// Make HMR use the public port (80) when going through Nginx
|
|
hmr: {
|
|
clientPort: 80, // browser connects to ws://<host>:80/…
|
|
protocol: 'ws', // dev over HTTP
|
|
host: 'localhost', // adjust if you open via a LAN IP
|
|
},
|
|
},
|
|
})
|