Files
streakfit-web/nuxt.config.ts
T
neckfireandClaude Opus 4.8 4e11e97b14
Build & Deploy / build (push) Successful in 6s
i18n front : facettes localisées + Web Push (SW push, abonnement, toggle profil)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 03:46:43 +02:00

93 lines
2.4 KiB
TypeScript

// StreakFit — PWA installable (SPA), thème flamme. https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
'@nuxt/eslint',
'@nuxt/ui',
'@nuxt/image',
'@nuxtjs/i18n',
'@pinia/nuxt',
'@vite-pwa/nuxt'
],
// App installable + offline : SPA pur (auth par cookie côté navigateur).
ssr: false,
devtools: { enabled: true },
css: ['~/assets/css/main.css'],
runtimeConfig: {
public: {
apiBase: 'https://api.streakfit.nfteam.ovh'
}
},
app: {
head: {
htmlAttrs: { lang: 'fr' },
title: 'StreakFit',
titleTemplate: '%s · StreakFit',
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' },
{ name: 'theme-color', content: '#F97316' },
{ name: 'description', content: 'Garde la flamme. Entraîne-toi, suis ta série, progresse.' }
],
link: [{ rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' }]
}
},
image: {
domains: ['s3.nfteam.ovh'],
format: ['webp']
},
i18n: {
strategy: 'no_prefix',
defaultLocale: 'fr',
locales: [
{ code: 'fr', name: 'Français', file: 'fr.json' },
{ code: 'pt-BR', name: 'Português (BR)', file: 'pt-BR.json' },
{ code: 'en', name: 'English', file: 'en.json' }
],
lazy: true,
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'sf_lang',
redirectOn: 'root'
}
},
pwa: {
strategies: 'injectManifest',
srcDir: 'service-worker',
filename: 'sw.ts',
registerType: 'autoUpdate',
injectManifest: {
globPatterns: ['**/*.{js,css,html,svg,png,ico,woff2}']
},
manifest: {
name: 'StreakFit',
short_name: 'StreakFit',
description: 'Garde la flamme. Entraîne-toi, suis ta série, progresse.',
lang: 'fr',
theme_color: '#F97316',
background_color: '#0B0B0F',
display: 'standalone',
orientation: 'portrait',
start_url: '/',
icons: [
{ src: '/pwa-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/pwa-512.png', sizes: '512x512', type: 'image/png' },
{ src: '/pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' }
]
},
client: { installPrompt: true }
},
compatibilityDate: '2026-06-30',
eslint: {
config: { stylistic: { commaDangle: 'never', braceStyle: '1tbs' } }
}
})