0cf7e65a2a
Adds a compatibility date for future reference.
77 lines
1.6 KiB
JavaScript
77 lines
1.6 KiB
JavaScript
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|
import { defineNuxtConfig } from 'nuxt/config'
|
|
|
|
export default defineNuxtConfig({
|
|
build: {
|
|
transpile: ['vuetify', 'date-fns'],
|
|
},
|
|
|
|
devtools: { enabled: true },
|
|
|
|
i18n: {
|
|
detectBrowserLanguage: {
|
|
useCookie: true,
|
|
cookieKey: 'nuxt_i18n_redirected',
|
|
redirectOn: 'root', // recommended
|
|
alwaysRedirect: true,
|
|
fallbackLocale: 'sv',
|
|
},
|
|
langDir: 'translations',
|
|
lazy: true,
|
|
locales: [
|
|
{ code: 'sv', name: 'Svenska', file: 'sv.ts' },
|
|
{ code: 'en', name: 'English', file: 'en.ts' },
|
|
],
|
|
defaultLocale: 'sv',
|
|
vueI18n: './i18n.config.ts', // if you are using custom path, default
|
|
},
|
|
|
|
modules: [
|
|
(_options, nuxt) => {
|
|
nuxt.hooks.hook('vite:extendConfig', (config) => {
|
|
// @ts-expect-error
|
|
config.plugins.push(
|
|
vuetify({
|
|
autoImport: true,
|
|
// styles: { configFile: "assets/settings.scss" },
|
|
}),
|
|
)
|
|
})
|
|
},
|
|
'@nuxt/eslint',
|
|
'@pinia/nuxt',
|
|
'@pinia-plugin-persistedstate/nuxt',
|
|
'@nuxtjs/i18n',
|
|
'@nuxt/devtools',
|
|
'@sentry/nuxt/module',
|
|
],
|
|
|
|
piniaPersistedstate: {
|
|
cookieOptions: {
|
|
sameSite: 'strict',
|
|
},
|
|
storage: 'localStorage',
|
|
},
|
|
|
|
ssr: false,
|
|
|
|
vite: {
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
api: 'modern',
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
dedupe: ['pinia'],
|
|
},
|
|
vue: {
|
|
template: {
|
|
transformAssetUrls,
|
|
},
|
|
},
|
|
},
|
|
|
|
compatibilityDate: '2024-11-03',
|
|
}) |