import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' export default defineNuxtConfig({ ssr: true, title: 'C.V. Olivier Massot', devtools: { // @see https://github.com/nuxt/devtools enabled: true, }, app: { head: { title: 'C.V. Olivier Massot', 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: 'en-US' } }, }, 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', '@nuxtjs/google-fonts', '@pinia/nuxt', ], vite: { esbuild: { drop: process.env.DEBUG ? [] : ['console', 'debugger'], tsconfigRaw: { compilerOptions: { experimentalDecorators: true, }, }, }, ssr: { noExternal: ['vuetify'], }, vue: { template: { transformAssetUrls, }, }, }, router: { options: { scrollBehaviorType: 'smooth', }, }, site: { url: 'https://cv.ogene.fr' }, i18n: { langDir: 'lang', lazy: true, locales: [ { code: 'en', iso: 'en-US', file: 'en.json', name: 'English', }, { code: 'fr', iso: 'fr-FR', file: 'fr.json', name: 'Français', }, ], compilation: { strictMessage: false, }, defaultLocale: 'fr', //@ts-ignore detectBrowserLanguage: true, }, googleFonts: { families: { Inter: true, }, }, compatibilityDate: '2024-07-02', })