jellyfin-vue/nuxt.config.ts

225 lines
5.5 KiB
TypeScript
Raw Normal View History

2020-09-02 18:34:50 +00:00
import type { NuxtConfig } from '@nuxt/types';
const config: NuxtConfig = {
/*
** Nuxt rendering mode
** See https://nuxtjs.org/api/configuration-mode
*/
2020-09-19 02:03:59 +00:00
ssr: false,
2020-11-09 21:00:34 +00:00
/*
** Disables telemetry prompt while installing dependencies
** See https://github.com/nuxt/telemetry
*/
2020-11-09 21:00:34 +00:00
telemetry: false,
2020-09-02 18:34:50 +00:00
/*
** Nuxt target
** See https://nuxtjs.org/api/configuration-target
*/
2020-09-03 05:57:42 +00:00
target: 'server',
/*
** Module loading mode
** See https://nuxtjs.org/api/configuration-modern
*/
modern: 'client',
/*
** Progress bar between routes
** See https://nuxtjs.org/api/configuration-loading
*/
loading: {
color: '#00A4DC',
failedColor: '#FF5252',
height: '4px'
},
2020-09-02 18:34:50 +00:00
/*
** Headers of the page
** See https://nuxtjs.org/api/configuration-head
*/
head: {
2020-09-19 02:03:59 +00:00
titleTemplate: '%s - Jellyfin',
title: 'Jellyfin',
2020-09-02 18:34:50 +00:00
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || ''
}
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
/*
** Global CSS
*/
css: ['~/assets/global.scss', '@mdi/font/css/materialdesignicons.css'],
2020-09-02 18:34:50 +00:00
/*
** Plugins to load before mounting the App
** https://nuxtjs.org/guide/plugins
*/
plugins: [
// General
'plugins/appInitPlugin.ts',
// Components
'plugins/components/vueperSlides.ts',
2020-09-25 22:45:22 +00:00
'plugins/components/vueVirtualScroller.ts',
// Utility
'plugins/browserDetection.ts',
'plugins/playbackProfile.ts',
'plugins/apiPlugin.ts'
],
2020-09-02 18:34:50 +00:00
/*
** Auto import components
** See https://nuxtjs.org/api/configuration-components
*/
components: true,
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxt/typescript-build',
// Doc: https://github.com/nuxt-community/stylelint-module
'@nuxtjs/stylelint-module',
2020-10-22 17:17:15 +00:00
'@nuxtjs/vuetify',
'@nuxtjs/date-fns'
2020-09-02 18:34:50 +00:00
],
/*
** Nuxt.js modules
*/
modules: [
2020-09-05 21:27:26 +00:00
'nuxt-i18n',
[
'nuxt-vuex-localstorage',
{
2020-09-11 23:20:43 +00:00
localStorage: ['user', 'deviceProfile']
}
],
2020-09-05 21:27:26 +00:00
// Doc: https://axios.nuxtjs.org/usage
2020-09-02 18:34:50 +00:00
'@nuxtjs/axios',
'@nuxtjs/auth',
2020-09-02 18:34:50 +00:00
'@nuxtjs/pwa'
],
/*
** Router configuration
*/
router: {
middleware: ['auth']
},
2020-09-02 18:34:50 +00:00
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {},
/*
** Axios-based Authentication
** See https://auth.nuxtjs.org/schemes/local.html#options
*/
auth: {
redirect: {
login: '/login',
logout: '/login',
callback: false,
home: '/'
},
strategies: {
jellyfin: {
_scheme: '~/schemes/jellyfinScheme'
}
}
},
2020-09-05 21:27:26 +00:00
i18n: {
locales: [
{ code: 'chi', iso: 'zh-Hans', name: '简体中文', file: 'zh_Hans.json' },
{ code: 'cs', iso: 'cs-CZ', name: 'Čeština', file: 'cs.json' },
{ code: 'de', iso: 'de-DE', name: 'Deutsch', file: 'de.json' },
2020-09-05 21:27:26 +00:00
{ code: 'en', iso: 'en-US', name: 'English', file: 'en-US.json' },
2020-10-15 22:21:47 +00:00
{ code: 'es', iso: 'es-ES', name: 'Español (España)', file: 'es.json' },
{ code: 'fr', iso: 'fr-FR', name: 'Français', file: 'fr-FR.json' },
2020-09-17 21:47:29 +00:00
{ code: 'nb', iso: 'nb-NO', name: 'Bokmål', file: 'nb_NO.json' },
{ code: 'nl', iso: 'nl-NL', name: 'Nederlands', file: 'nl.json' },
2020-09-17 21:47:29 +00:00
{ code: 'pl', iso: 'pl-PL', name: 'Polski', file: 'pl.json' },
{ code: 'ro', iso: 'ro-RO', name: 'Română', file: 'ro.json' },
2020-09-17 21:47:29 +00:00
{ code: 'sk', iso: 'sk-SK', name: 'Slovenčina', file: 'sk.json' },
{ code: 'sl', iso: 'sl-SI', name: 'Slovenščina', file: 'sl.json' },
{ code: 'sv', iso: 'sv-SE', name: 'Svenska', file: 'sv.json' },
2020-09-17 21:47:29 +00:00
{ code: 'ta', iso: 'ta-IN', name: 'தமிழ்', file: 'ta.json' },
{ code: 'tr', iso: 'tr-TR', name: 'Türkçe', file: 'tr.json' },
{ code: 'vi', iso: 'vi-VN', name: 'Tiếng Việt', file: 'vi.json' }
2020-09-05 21:27:26 +00:00
],
lazy: true,
langDir: 'locales/',
strategy: 'no_prefix'
},
2020-09-02 18:34:50 +00:00
/*
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module
*/
vuetify: {
customVariables: ['~/assets/variables.scss'],
2020-10-22 17:17:15 +00:00
treeShake: true,
defaultAssets: false,
2020-09-02 18:34:50 +00:00
theme: {
dark: true,
default: 'dark',
disable: false,
themes: {
dark: {
primary: '#00A4DC',
secondary: '#424242',
accent: '#FF4081',
info: '#2196F3',
warning: '#FB8C00',
error: '#FF5252',
success: '#4CAF50',
background: '#101010',
track: '#272727',
thumb: '#303030'
2020-09-10 18:33:48 +00:00
},
light: {
primary: '#00A4DC',
secondary: '#424242',
accent: '#FF4081',
info: '#2196F3',
warning: '#FB8C00',
error: '#FF5252',
success: '#4CAF50',
background: '#f2f2f2',
track: '#FFFFFF',
thumb: '#000000'
}
},
options: {
customProperties: true
}
2020-09-02 18:34:50 +00:00
}
},
/*
** Build configuration
** See https://nuxtjs.org/api/configuration-build/
*/
2020-09-17 12:05:36 +00:00
build: {
babel: {
// envName: server, client, modern
presets() {
return [
[
'@nuxt/babel-preset-app',
{
corejs: { version: 3 }
}
]
];
}
},
transpile: ['@nuxtjs/auth']
2020-09-17 12:05:36 +00:00
},
/**
* Host set to 0.0.0.0 in order to access the dev server on the LAN
*/
server: {
host: '0.0.0.0'
}
2020-09-02 18:34:50 +00:00
};
export default config;