Some checks failed
Deploy to Easypanel / deploy (push) Has been cancelled
clientId/token error
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
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: [],
|
|
},
|
|
}),
|
|
],
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
'@components': path.resolve(__dirname, './src/components'),
|
|
'@layouts': path.resolve(__dirname, './src/layouts'),
|
|
'@styles': path.resolve(__dirname, './src/styles'),
|
|
'@content': path.resolve(__dirname, './src/content'),
|
|
},
|
|
},
|
|
},
|
|
output: 'static',
|
|
build: {
|
|
assets: '_assets',
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 4321,
|
|
},
|
|
}) |