Files
crabwalk/vite.config.ts
T
Luciano Castillo eabebfd761 support ALLOWED_HOSTS env var, fix Dockerfile missing source files (#12)
- parse ALLOWED_HOSTS into vite server.allowedHosts for LAN/tailscale access
- copy src/, public/, vite.config.ts, tsconfig.json into Docker runtime stage
  (dev server needs these, only dist/ was copied before)
- pass ALLOWED_HOSTS through docker-compose

Ref #10
2026-01-28 12:21:06 -05:00

23 lines
599 B
TypeScript

import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact from '@vitejs/plugin-react'
import viteTsConfigPaths from 'vite-tsconfig-paths'
import tailwindcss from '@tailwindcss/vite'
const allowedHosts = process.env.ALLOWED_HOSTS
? process.env.ALLOWED_HOSTS.split(',').map(host => host.trim()).filter(Boolean)
: undefined
export default defineConfig({
server: {
allowedHosts,
},
plugins: [
viteTsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
tanstackStart(),
viteReact(),
],
})