Files
Art-gallery/client/vite.config.ts
T
Danila Khodjaef 2b4274093e Add seed scripts, proxy Vite on public domain, and seed painting images.
Restore seed-wikipedia.js and seed-catalog-data.js so npm run setup works on a fresh clone. Point nginx at the Vite dev client and allow the public hostname in Vite config.
2026-07-03 13:52:57 +03:00

22 lines
545 B
TypeScript

import path from 'node:path'
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, path.resolve(__dirname, '..'), '')
const apiTarget = `http://localhost:${env.PORT || '3001'}`
return {
plugins: [react()],
server: {
host: true,
allowedHosts: ['gallery.mysuperlab.netcraze.pro', 'localhost'],
proxy: {
'/api': apiTarget,
'/images': apiTarget,
},
},
}
})