Initial commit
This commit is contained in:
80
nuxt.config.ts
Normal file
80
nuxt.config.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
// 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'
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user