Files
dancefinder-app/nuxt.config.js
T

81 lines
1.6 KiB
JavaScript
Raw Normal View History

2024-02-05 16:48:02 +01:00
import { defineNuxtConfig } from 'nuxt/config'
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
2022-08-16 06:55:09 +02:00
export default defineNuxtConfig({
build: {
2024-02-05 16:48:02 +01:00
transpile: ['vuetify', 'date-fns'],
2019-01-15 13:21:24 +01:00
},
devServer: {
port: 3001,
},
2024-02-05 16:48:02 +01:00
devtools: { enabled: true },
i18n: {
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'nuxt_i18n_redirected',
2024-02-05 16:48:02 +01:00
redirectOn: 'root', // recommended
alwaysRedirect: true,
2024-02-05 16:48:02 +01:00
fallbackLocale: 'sv',
},
2024-02-05 16:48:02 +01:00
langDir: 'translations',
lazy: true,
locales: [
2024-02-05 16:48:02 +01:00
{ code: 'sv', name: 'Svenska', file: 'sv.ts' },
{ code: 'en', name: 'English', file: 'en.ts' },
],
defaultLocale: 'sv',
2024-02-05 16:48:02 +01:00
vueI18n: './i18n.config.ts', // if you are using custom path, default
},
modules: [
2024-02-05 16:48:02 +01:00
(_options, nuxt) => {
nuxt.hooks.hook('vite:extendConfig', (config) => {
// @ts-expect-error
config.plugins.push(
vuetify({
autoImport: true,
// styles: { configFile: "assets/settings.scss" },
}),
)
})
},
'@nuxt/eslint',
2023-08-01 20:21:31 +02:00
'@pinia/nuxt',
'pinia-plugin-persistedstate/nuxt',
2024-02-05 16:48:02 +01:00
'@nuxtjs/i18n',
'@nuxt/devtools',
],
2024-02-05 16:48:02 +01:00
piniaPersistedstate: {
cookieOptions: {
sameSite: 'strict',
},
storage: 'localStorage',
2020-04-03 14:07:42 +02:00
},
ssr: false,
2024-02-05 16:48:02 +01:00
vite: {
css: {
preprocessorOptions: {
scss: {
api: 'modern',
},
},
},
2024-02-05 16:48:02 +01:00
resolve: {
dedupe: ['pinia'],
},
vue: {
template: {
transformAssetUrls,
},
},
},
compatibilityDate: '2024-11-03',
})