From 7c16d5086888f71ae7b843dbbd61aeb8a9ca654a Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Mon, 27 Apr 2026 20:25:31 +0700 Subject: [PATCH] Remove Tina from build config - only enable at runtime --- astro.config.mjs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index cd6a0cc..719afc4 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,27 +1,18 @@ import { defineConfig } from 'astro/config' import tailwindcss from '@tailwindcss/vite' -import tina from 'tinacms' import { fileURLToPath } from 'url' import path from 'path' const __dirname = path.dirname(fileURLToPath(import.meta.url)) -// Only enable Tina CMS when TINA_TOKEN is provided AND we're not in build mode -const isBuild = process.argv.includes('build') -const tinaEnabled = !isBuild && !!process.env.TINA_TOKEN - export default defineConfig({ site: 'https://example.com', - integrations: [ - tina({ - enabled: tinaEnabled, - sidebar: { - partials: [], - }, - }), - ], + integrations: [], vite: { plugins: [tailwindcss()], + define: { + 'import.meta.env.TINA_TOKEN': JSON.stringify(process.env.TINA_TOKEN || ''), + }, resolve: { alias: { '@': path.resolve(__dirname, './src'),