build: used env to specify base and url

This commit is contained in:
Simeon Radivoev 2026-05-06 23:35:09 +03:00
parent 08f249ca35
commit 83f8c84a04
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
3 changed files with 7 additions and 3 deletions

View file

@ -1,11 +1,14 @@
// @ts-check
import { defineConfig } from 'astro/config';
import tailwindcss from '@tailwindcss/vite'
import { loadEnv } from 'vite';
const env = loadEnv(process.env.NODE_ENV, process.cwd(), '');
// https://astro.build/config
export default defineConfig({
site: 'https://simeonradivoev.github.io',
base: '/gameflow',
site: env.SITE_URL,
base: `/${env.SITE_BASE}`,
vite: {
plugins: [
tailwindcss()