Files
harheimertc/nuxt.config.js
Torsten Schulz (local) bf1caefde4
All checks were successful
Code Analysis and Production Deploy / analyze (push) Successful in 7m31s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Successful in 2m1s
feat: update security headers and improve content security policy; enhance hero image component and loading states in public news
2026-05-31 14:19:15 +02:00

137 lines
4.9 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: process.env.NODE_ENV !== 'production' },
modules: ['@nuxtjs/tailwindcss', '@pinia/nuxt'],
nitro: {
preset: 'node-server',
dev: process.env.NODE_ENV !== 'production',
sourceMap: false
},
vite: {
build: {
reportCompressedSize: false
}
},
// Erzwinge Dev-Port und Host zuverlässig für `npm run dev`
devServer: {
port: 3100,
host: '0.0.0.0'
},
runtimeConfig: {
// Private keys (only available on server-side)
jwtSecret: process.env.JWT_SECRET || 'local_development_secret_key_change_in_production',
encryptionKey: process.env.ENCRYPTION_KEY || 'local_development_encryption_key_change_in_production',
smtpHost: process.env.SMTP_HOST || 'smtp.gmail.com',
smtpPort: process.env.SMTP_PORT || 587,
smtpUser: process.env.SMTP_USER || 'tsschulz@tsschulz.de',
smtpPass: process.env.SMTP_PASS || '',
// Public keys (exposed to client-side)
public: {
baseUrl: process.env.NUXT_PUBLIC_BASE_URL || 'http://localhost:3100',
nodeEnv: process.env.NODE_ENV || 'development'
}
},
app: {
head: {
title: 'Harheimer Tischtennis-Club 1954 e.V. - Offizielle Website',
htmlAttrs: {
lang: 'de'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' },
{
name: 'description',
content: 'Offizielle Website des Harheimer Tischtennis-Club 1954 e.V. - Informationen zu Mannschaften, Terminen, Training und Mitgliedschaft.'
},
{
name: 'keywords',
content: 'Harheimer Tischtennis-Club, Tischtennis, Verein, Mannschaften, Training, Mitgliedschaft, Frankfurt, Harheim, Tischtennisclub, Sport, Pingpong'
},
{
name: 'author',
content: 'Harheimer Tischtennis-Club 1954 e.V.'
},
{
name: 'robots',
content: 'index, follow'
},
// Open Graph / Facebook
{ property: 'og:type', content: 'website' },
{ property: 'og:url', content: 'https://www.harheimertc.de/' },
{ property: 'og:title', content: 'Harheimer Tischtennis-Club 1954 e.V.' },
{ property: 'og:description', content: 'Offizielle Website des Harheimer Tischtennis-Club 1954 e.V.' },
// Twitter
{ property: 'twitter:card', content: 'summary_large_image' },
{ property: 'twitter:url', content: 'https://www.harheimertc.de/' },
{ property: 'twitter:title', content: 'Harheimer Tischtennis-Club 1954 e.V.' },
{ property: 'twitter:description', content: 'Offizielle Website des Harheimer Tischtennis-Club 1954 e.V.' }
],
link: [
{ rel: 'canonical', href: 'https://www.harheimertc.de/' }
]
}
},
css: ['~/assets/css/main.css'],
compatibilityDate: '2024-04-03',
hooks: {
'build:before': async () => {
const fs = await import('fs/promises')
const path = await import('path')
// Erstelle uploads Verzeichnis im public Ordner
const uploadsDir = path.join(process.cwd(), '.output', 'public', 'uploads')
try {
await fs.mkdir(uploadsDir, { recursive: true })
console.log('✅ Uploads-Verzeichnis erstellt:', uploadsDir)
} catch (error) {
console.log(' Uploads-Verzeichnis bereits vorhanden oder Fehler:', error.message)
}
// Erstelle temp Verzeichnis für LaTeX-Kompilierung
const tempDir = path.join(process.cwd(), '.output', 'temp')
try {
await fs.mkdir(tempDir, { recursive: true })
console.log('✅ Temp-Verzeichnis erstellt:', tempDir)
} catch (error) {
console.log(' Temp-Verzeichnis bereits vorhanden oder Fehler:', error.message)
}
},
'build:after': async () => {
const fs = await import('fs/promises')
const path = await import('path')
// Erstelle uploads Verzeichnis im public Ordner (nach dem Build)
const uploadsDir = path.join(process.cwd(), '.output', 'public', 'uploads')
try {
await fs.mkdir(uploadsDir, { recursive: true })
console.log('✅ Uploads-Verzeichnis nach Build erstellt:', uploadsDir)
} catch (error) {
console.log(' Uploads-Verzeichnis bereits vorhanden oder Fehler:', error.message)
}
// Erstelle temp Verzeichnis für LaTeX-Kompilierung (nach dem Build)
const tempDir = path.join(process.cwd(), '.output', 'temp')
try {
await fs.mkdir(tempDir, { recursive: true })
console.log('✅ Temp-Verzeichnis nach Build erstellt:', tempDir)
} catch (error) {
console.log(' Temp-Verzeichnis bereits vorhanden oder Fehler:', error.message)
}
}
}
})