Files
dancefinder-app/nuxt.config.js
T
argoyle 71f772d41a chore: update package management from yarn to npm
Remove unused dependencies from package.json and switch 
the project’s package manager from Yarn to NPM. This 
enhances compatibility with NPM-based workflows and 
reduces conflicts by ensuring consistent installs through 
npm ci. Additionally, update the Pinia plugin to a newer 
version for better performance and functionality.
2024-11-06 14:40:02 +01:00

82 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'],
},
devServer: {
port: 3001,
},
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',
})