import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' export default defineNuxtConfig({ ssr: true, title: 'La Sauvagerie - Location de vacances', devtools: { // @see https://github.com/nuxt/devtools enabled: true, }, app: { head: { title: 'La Sauvagerie - Location de vacances', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, ], htmlAttrs: { lang: 'fr-FR' } }, }, runtimeConfig: { challengeUrl: 'https://api.ogene.fr/api/challenge', public: { challengeUrl: 'https://api.ogene.fr/api/challenge' } }, build: { transpile: ['vuetify'], }, hooks: { 'builder:watch': console.log, }, modules: [ async (_, nuxt) => { nuxt.hooks.hook('vite:extendConfig', (config) => // @ts-expect-error A revoir après que les lignes aient été décommentées (config.plugins ?? []).push( vuetify() // Remplacer par cela quand l'issue https://github.com/vuetifyjs/vuetify-loader/issues/273 sera règlée.. // voir aussi : https://github.com/nuxt/nuxt/issues/15412 et https://github.com/vuetifyjs/vuetify-loader/issues/290 // voir aussi : https://github.com/jrutila/nuxt3-vuetify3-bug // vuetify({ // styles: { configFile: './assets/css/settings.scss' } // }) ) ) }, 'nuxt-lodash', '@nuxt/devtools', '@nuxtjs/sitemap', [ '@nuxtjs/i18n', { vueI18n: './i18n/i18n.config.ts' } ], '@nuxtjs/google-fonts', '@pinia/nuxt', ], vite: { esbuild: { drop: process.env.DEBUG ? [] : ['console', 'debugger'], tsconfigRaw: { compilerOptions: { experimentalDecorators: true, }, }, }, ssr: { noExternal: ['vuetify'], }, vue: { template: { transformAssetUrls, }, }, }, i18n: { langDir: 'lang', lazy: true, strategy: 'no_prefix', locales: [ { code: 'en', iso: 'en-US', file: 'en.json', name: 'English', }, { code: 'fr', iso: 'fr-FR', file: 'fr.json', name: 'Français', }, ], defaultLocale: 'fr', detectBrowserLanguage: false, vueI18n: './i18n.config.ts', }, router: { options: { scrollBehaviorType: 'smooth', }, }, site: { url: 'https://sauvagerie.fr' }, googleFonts: { families: { Inter: true, }, }, compatibilityDate: '2024-07-02', })