Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+100
@@ -0,0 +1,100 @@
|
||||
// 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: {
|
||||
registerType: 'autoUpdate',
|
||||
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' }
|
||||
]
|
||||
},
|
||||
workbox: {
|
||||
navigateFallback: '/',
|
||||
globPatterns: ['**/*.{js,css,html,svg,png,wo4,woff2}'],
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: ({ url }: { url: URL }) => url.hostname === 's3.nfteam.ovh',
|
||||
handler: 'CacheFirst',
|
||||
options: {
|
||||
cacheName: 'sf-media',
|
||||
expiration: { maxEntries: 500, maxAgeSeconds: 60 * 60 * 24 * 30 }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
client: { installPrompt: true }
|
||||
},
|
||||
|
||||
compatibilityDate: '2026-06-30',
|
||||
|
||||
eslint: {
|
||||
config: { stylistic: { commaDangle: 'never', braceStyle: '1tbs' } }
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user