81 lines
1.5 KiB
TypeScript
81 lines
1.5 KiB
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
|
|
const rybbitUrl = process.env.NUXT_PUBLIC_RYBBIT_URL
|
|
const rybbitSiteId = process.env.NUXT_PUBLIC_RYBBIT_SITE_ID
|
|
|
|
export default defineNuxtConfig({
|
|
|
|
modules: [
|
|
'@nuxt/eslint',
|
|
'@nuxt/ui',
|
|
'@nuxt/image',
|
|
'@nuxtjs/i18n',
|
|
'@pinia/nuxt',
|
|
'@nuxt/test-utils/module'
|
|
],
|
|
|
|
ssr: false,
|
|
|
|
devtools: {
|
|
enabled: true
|
|
},
|
|
app: {
|
|
head: {
|
|
script: [
|
|
...(rybbitUrl && rybbitSiteId
|
|
? [{
|
|
'src': rybbitUrl + '/api/script.js',
|
|
'defer': true,
|
|
'data-site-id': rybbitSiteId
|
|
}]
|
|
: [])
|
|
]
|
|
}
|
|
},
|
|
|
|
css: ['~/assets/css/main.css'],
|
|
|
|
runtimeConfig: {
|
|
public: {
|
|
appUrl: 'http://localhost:3000',
|
|
pocketbaseUrl: 'http://127.0.0.1:8090',
|
|
rybbitScriptUrl: '',
|
|
rybbitSiteId: ''
|
|
}
|
|
},
|
|
|
|
dir: {
|
|
public: 'app/public' // moved to app dir to clean up root
|
|
},
|
|
|
|
experimental: {
|
|
asyncContext: false,
|
|
payloadExtraction: true
|
|
},
|
|
|
|
compatibilityDate: '2025-01-15',
|
|
|
|
eslint: {
|
|
config: {
|
|
stylistic: {
|
|
commaDangle: 'never',
|
|
braceStyle: '1tbs'
|
|
}
|
|
}
|
|
},
|
|
|
|
i18n: {
|
|
langDir: '../app/i18n/locales', // moved to app dir to clean up root
|
|
defaultLocale: 'en',
|
|
strategy: 'no_prefix',
|
|
locales: [
|
|
{ code: 'en', name: 'English', file: 'en.json' },
|
|
{ code: 'de', name: 'Deutsch', file: 'de.json' }
|
|
],
|
|
detectBrowserLanguage: {
|
|
useCookie: true,
|
|
cookieKey: 'app_language'
|
|
}
|
|
}
|
|
})
|