mirror of
https://github.com/crabwise-ai/crabwalk.git
synced 2026-08-14 00:57:52 +00:00
- 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
23 lines
599 B
TypeScript
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(),
|
|
],
|
|
}) |