Remove Tina from build config - only enable at
Some checks failed
Deploy to Easypanel / deploy (push) Has been cancelled
Some checks failed
Deploy to Easypanel / deploy (push) Has been cancelled
runtime
This commit is contained in:
@@ -1,27 +1,18 @@
|
|||||||
import { defineConfig } from 'astro/config'
|
import { defineConfig } from 'astro/config'
|
||||||
import tailwindcss from '@tailwindcss/vite'
|
import tailwindcss from '@tailwindcss/vite'
|
||||||
import tina from 'tinacms'
|
|
||||||
import { fileURLToPath } from 'url'
|
import { fileURLToPath } from 'url'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
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({
|
export default defineConfig({
|
||||||
site: 'https://example.com',
|
site: 'https://example.com',
|
||||||
integrations: [
|
integrations: [],
|
||||||
tina({
|
|
||||||
enabled: tinaEnabled,
|
|
||||||
sidebar: {
|
|
||||||
partials: [],
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [tailwindcss()],
|
plugins: [tailwindcss()],
|
||||||
|
define: {
|
||||||
|
'import.meta.env.TINA_TOKEN': JSON.stringify(process.env.TINA_TOKEN || ''),
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, './src'),
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
|||||||
Reference in New Issue
Block a user