DEV_HOST env var now controls the hostname, defaulting to localhost. This makes the dev setup work on any machine without requiring a specific DNS entry.
24 lines
514 B
TypeScript
24 lines
514 B
TypeScript
import tailwindcss from "@tailwindcss/vite";
|
|
import react from '@vitejs/plugin-react-swc';
|
|
import path from "path";
|
|
import { env } from "process";
|
|
import { defineConfig } from 'vite';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
build: {
|
|
outDir: "dist"
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
allowedHosts: [
|
|
env.DEV_HOST ?? 'localhost',
|
|
'wrongmove.viktorbarzin.me',
|
|
],
|
|
}
|
|
})
|