Files
dancefinder-app/nuxt.config.js
T

152 lines
3.4 KiB
JavaScript
Raw Normal View History

2022-08-16 06:55:09 +02:00
import { defineNuxtConfig } from '@nuxt/bridge'
import translations from './translations'
import numberFormats from './translations/numberFormats'
2022-08-16 06:55:09 +02:00
export default defineNuxtConfig({
alias: {
tslib: 'tslib/tslib.es6.js'
},
2024-02-02 18:55:45 +01:00
bridge: {
meta: true
},
build: {
extend (config) {
config.module.rules.push({
include: /node_modules/,
test: /\.mjs$/,
type: 'javascript/auto'
})
},
babel: {
presets ({ isServer }) {
return [
[
2022-08-16 06:55:09 +02:00
// require.resolve('@nuxt/babel-preset-app'),
require.resolve('@nuxt/babel-preset-app-edge'), // For nuxt-edge users
{
buildTarget: isServer ? 'server' : 'client',
corejs: { version: 3 }
}
]
]
}
},
loaders: {
vue: {
prettify: false
}
},
2024-02-02 18:55:45 +01:00
transpile: ['date-fns', '@unhead/vue', 'unhead']
},
buildModules: [
// https://go.nuxtjs.dev/eslint
2023-10-24 07:20:17 +02:00
['@nuxtjs/eslint-module', { exclude: ['graphql/generated', 'node_modules'] }],
// https://go.nuxtjs.dev/stylelint
'@nuxtjs/stylelint-module',
// https://go.nuxtjs.dev/vuetify
'@nuxtjs/vuetify'
],
css: ['vuetify/dist/vuetify.css', '~/assets/scss/global.scss'],
env: {
2020-01-25 14:59:14 +01:00
graphqlApi: process.env.GRAPHQL_API
},
2019-01-15 13:21:24 +01:00
head: {
link: [
2020-01-25 14:59:14 +01:00
{
rel: 'apple-touch-icon',
sizes: '180x180',
href: '/apple-touch-icon.png'
},
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: '/favicon-32x32.png'
},
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: '/favicon-16x16.png'
},
{ rel: 'manifest', href: '/site.webmanifest' },
{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#7f0aff' },
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons'
2020-01-25 14:59:14 +01:00
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Material+Icons'
},
{
rel: 'stylesheet',
href: 'https://cdn.materialdesignicons.com/3.3.92/css/materialdesignicons.min.css'
2020-01-25 14:59:14 +01:00
}
2019-01-15 13:21:24 +01:00
],
meta: [
2020-01-25 14:59:14 +01:00
{
name: 'viewport',
content:
'width=device-width, initial-scale=1, user-scalable=no, minimal-ui'
}
]
2019-01-15 13:21:24 +01:00
},
i18n: {
strategy: 'prefix_and_default',
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'nuxt_i18n_redirected',
alwaysRedirect: true,
fallbackLocale: 'sv'
},
locales: [
{
code: 'en',
iso: 'en-US'
},
{
code: 'sv',
iso: 'sv-SE'
}
],
defaultLocale: 'sv',
vueI18n: {
fallbackLocale: 'sv',
messages: translations,
numberFormats
}
},
modules: [
2021-11-21 17:58:37 +01:00
'@nuxtjs/i18n',
2023-08-01 20:21:31 +02:00
'@pinia/nuxt',
'@nuxtjs/sentry'
],
plugins: [
2020-06-21 17:59:14 +02:00
'~/plugins/apollo',
2023-08-01 20:21:31 +02:00
'~/plugins/i18n',
'~/plugins/pinia'
],
router: {
2020-04-06 10:52:55 +02:00
middleware: ['auth']
},
2020-04-03 14:07:42 +02:00
sentry: {
2023-01-04 16:01:00 +01:00
dsn: 'https://da2e8d42185a4013909d49955432a116@o365290.ingest.sentry.io/5187660',
2023-01-04 16:21:49 +01:00
config: {
tracing: {
tracesSampleRate: 1.0,
browserTracing: {},
vueOptions: {
trackComponents: true
}
}
} // Additional config
2020-04-03 14:07:42 +02:00
},
ssr: false,
2022-08-16 06:55:09 +02:00
target: 'static',
vuetify: {
optionsPath: './vuetify.options.js'
2020-04-06 10:52:55 +02:00
}
2022-08-16 06:55:09 +02:00
})