149 lines
3.6 KiB
TypeScript
149 lines
3.6 KiB
TypeScript
// @ts-ignore
|
||
// import path from 'path'
|
||
// @ts-ignore
|
||
|
||
import tracks from './tracks.config'
|
||
|
||
export default defineNuxtConfig({
|
||
ssr: false,
|
||
devServer: {
|
||
https: {
|
||
key: './cert/localhost.key',
|
||
cert: './cert/localhost.crt'
|
||
}
|
||
},
|
||
runtimeConfig: {
|
||
// Private variables (only available server-side)
|
||
privateKey: process.env.PRIVATE_KEY,
|
||
public: {
|
||
tracks,
|
||
noise_src: '/masking/Quellrauschen_loopbar_+10dB.mp3',
|
||
apiUrl: process.env.BACKEND_URL || 'https://dev.b.mindboost.team'
|
||
}
|
||
},
|
||
|
||
plugins: [
|
||
{ src: '~/plugins/AudioVisual.client', mode: 'client' },
|
||
{ src: '~/plugins/PiniaPlugin', mode: 'client' },
|
||
{
|
||
src: '~/plugins/vue-video-background.client',
|
||
ssr: false,
|
||
mode: 'client'
|
||
},
|
||
{ src: '~/plugins/toastr.client', ssr: false, mode: 'client' },
|
||
{ src: '~/plugins/axios' },
|
||
{ src: '~/plugins/logger.server', ssr: true, mode: 'server' }, // Registriert den Pino-Logger'
|
||
{ src: '~/plugins/logger.client', mode: 'client' } // Registriert den Pino-Logger'
|
||
],
|
||
app: {
|
||
pageTransition: {
|
||
name: 'slide-right',
|
||
mode: 'out-in'
|
||
},
|
||
head: {
|
||
link: [
|
||
{
|
||
rel: 'stylesheet',
|
||
href: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css'
|
||
}
|
||
],
|
||
script: [
|
||
{
|
||
src: 'https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js'
|
||
},
|
||
{
|
||
src: 'https://cdn.jsdelivr.net/npm/sweetalert2@11'
|
||
}
|
||
]
|
||
}
|
||
},
|
||
|
||
modules: [
|
||
'@pinia/nuxt',
|
||
'@nuxtjs/i18n',
|
||
'@nuxtjs/eslint-module',
|
||
'@vite-pwa/nuxt'
|
||
],
|
||
pwa: {
|
||
registerType: 'autoUpdate',
|
||
includeAssets: ['favicon.svg'],
|
||
manifest: {
|
||
name: "mindboost - better keep your focus",
|
||
short_name: "mindboost",
|
||
lang: "de",
|
||
description: "When the world gets loud, mindboost® helps you stay calm and focused. Developed by experts in audio and psychoacoustics, it’s the first adaptive speech blocker that gently filters out distracting voices—so your mind stays clear, no matter the noise.",
|
||
start_url: '/',
|
||
scope: "/",
|
||
display: 'standalone',
|
||
background_color: "#030504",
|
||
theme_color: "#E9A446",
|
||
icons: [
|
||
{
|
||
"src": "/android-chrome-192x192.png",
|
||
"sizes": "192x192",
|
||
"type": "image/png"
|
||
},
|
||
{
|
||
"src": "/android-chrome-512x512.png",
|
||
"sizes": "512x512",
|
||
"type": "image/png"
|
||
}]
|
||
},
|
||
workbox: {
|
||
runtimeCaching: [
|
||
{
|
||
urlPattern: ({ url }) => url.pathname.startsWith('/api/'),
|
||
handler: 'NetworkFirst',
|
||
options: {
|
||
cacheName: 'api-cache',
|
||
expiration: { maxEntries: 50 },
|
||
},
|
||
},
|
||
],
|
||
},
|
||
},
|
||
i18n: {
|
||
bundle: {
|
||
optimizeTranslationDirective: false
|
||
},
|
||
strategy: 'prefix',
|
||
locales: ['en', 'de'], // used in URL path prefix
|
||
defaultLocale: 'de', // default locale of your project for Nuxt pages and routings
|
||
detectBrowserLanguage: false,
|
||
|
||
vueI18n: '../i18n.config.ts'
|
||
},
|
||
|
||
css: ['~/assets/css/style.css'],
|
||
|
||
vite: {
|
||
// enable big integer literals
|
||
// see: https://stackoverflow.com/a/76802679/10043870
|
||
build: {
|
||
target: ['esnext']
|
||
},
|
||
optimizeDeps: {
|
||
esbuildOptions: {
|
||
target: 'esnext',
|
||
supported: {
|
||
bigint: true
|
||
}
|
||
}
|
||
}
|
||
},
|
||
|
||
devtools: {
|
||
timeline: {
|
||
enabled: true
|
||
},
|
||
|
||
enabled: false
|
||
},
|
||
|
||
compatibilityDate: '2024-10-09',
|
||
|
||
routeRules: {
|
||
'/auth/verify-email/**': { ssr: true }
|
||
}
|
||
})
|