202 lines
4.8 KiB
JavaScript
202 lines
4.8 KiB
JavaScript
import colors from 'vuetify/es5/util/colors'
|
|
import { config } from 'dotenv'
|
|
|
|
const env = config().parsed
|
|
|
|
export default {
|
|
mode: 'universal',
|
|
/*
|
|
** Headers of the page
|
|
*/
|
|
head: {
|
|
titleTemplate: '%s - ' + 'SimpleNotes',
|
|
title: 'SimpleNotes' || '',
|
|
htmlAttrs: {
|
|
lang: 'en',
|
|
},
|
|
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' },
|
|
{
|
|
rel: 'preload',
|
|
href: '/fonts/roboto-v20-latin-regular.woff2',
|
|
as: 'font',
|
|
type: 'font/woff2',
|
|
crossorigin: 'anonymous',
|
|
},
|
|
],
|
|
},
|
|
/*
|
|
** Customize the progress-bar color
|
|
*/
|
|
loading: { color: '#fff' },
|
|
/*
|
|
** Global CSS
|
|
*/
|
|
css: ['~/assets/main.css'],
|
|
/*
|
|
** Plugins to load before mounting the App
|
|
*/
|
|
plugins: ['~/plugins/theme.client.js'],
|
|
/*
|
|
** Nuxt.js dev-modules
|
|
*/
|
|
buildModules: [
|
|
// Doc: https://github.com/nuxt-community/eslint-module
|
|
'@nuxtjs/vuetify',
|
|
'@nuxtjs/eslint-module',
|
|
],
|
|
/*
|
|
** Nuxt.js modules
|
|
*/
|
|
modules: [
|
|
// Doc: https://axios.nuxtjs.org/usage
|
|
'@nuxtjs/axios',
|
|
// Doc: https://github.com/nuxt-community/dotenv-module
|
|
'@nuxtjs/dotenv',
|
|
'@nuxtjs/auth',
|
|
'cookie-universal-nuxt',
|
|
],
|
|
/*
|
|
** Axios module configuration
|
|
** See https://axios.nuxtjs.org/options
|
|
*/
|
|
axios: {
|
|
headers: {
|
|
common: {
|
|
Accept: 'application/json',
|
|
},
|
|
delete: {},
|
|
get: {},
|
|
head: {},
|
|
post: {},
|
|
put: {},
|
|
patch: {},
|
|
},
|
|
},
|
|
|
|
env: {
|
|
API_HOST: env.API_HOST,
|
|
},
|
|
|
|
auth: {
|
|
redirect: {
|
|
login: '/account',
|
|
logout: '/',
|
|
home: '/',
|
|
},
|
|
watchLoggedIn: true,
|
|
cookie: {
|
|
prefix: 'auth.',
|
|
options: {
|
|
path: '/',
|
|
},
|
|
},
|
|
strategies: {
|
|
_scheme: 'local',
|
|
_name: 'local',
|
|
local: {
|
|
endpoints: {
|
|
login: {
|
|
url: '/user/login',
|
|
method: 'post',
|
|
propertyName: 'token',
|
|
},
|
|
user: {
|
|
url: '/user/me',
|
|
method: 'get',
|
|
propertyName: 'user',
|
|
},
|
|
logout: false,
|
|
},
|
|
autoFetchUser: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
router: {
|
|
middleware: ['auth'],
|
|
},
|
|
|
|
/*
|
|
** vuetify module configuration
|
|
** https://github.com/nuxt-community/vuetify-module
|
|
*/
|
|
vuetify: {
|
|
defaultAssets: false,
|
|
theme: {
|
|
dark: false,
|
|
themes: {
|
|
dark: {
|
|
primary: '#21CFF3',
|
|
secondary: '#FF4081',
|
|
accent: '#ffe18d',
|
|
success: '#4CAF50',
|
|
info: '#2196F3',
|
|
warning: '#FB8C00',
|
|
error: '#FF5252',
|
|
},
|
|
light: {
|
|
primary: '#1976D2',
|
|
secondary: '#e91e63',
|
|
accent: '#30b1dc',
|
|
success: '#4CAF50',
|
|
info: '#2196F3',
|
|
warning: '#FB8C00',
|
|
error: '#FF5252',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
generate: {
|
|
fallback: '404.html',
|
|
},
|
|
/*
|
|
** Build configuration
|
|
*/
|
|
build: {
|
|
extractCSS: true,
|
|
|
|
terser: {
|
|
parallel: true,
|
|
cache: false,
|
|
sourceMap: false,
|
|
extractComments: false,
|
|
terserOptions: {},
|
|
},
|
|
|
|
html: {
|
|
minify: {
|
|
collapseBooleanAttributes: true,
|
|
decodeEntities: true,
|
|
minifyCSS: true,
|
|
minifyJS: true,
|
|
processConditionalComments: true,
|
|
removeEmptyAttributes: true,
|
|
removeRedundantAttributes: true,
|
|
trimCustomFragments: true,
|
|
useShortDoctype: true,
|
|
collapseWhitespace: true,
|
|
removeComments: true,
|
|
},
|
|
},
|
|
|
|
/*
|
|
** You can extend webpack config here
|
|
*/
|
|
extend(config, ctx) {},
|
|
},
|
|
}
|