v3.0.0/nuxt.config.js

89 lines
3.3 KiB
JavaScript
Raw Normal View History

2019-02-21 15:49:48 +01:00
import dotenv from 'dotenv/config';
2018-09-19 09:45:50 +02:00
import autoprefixer from 'autoprefixer';
const Util = require('./src/api/utils/Util');
2018-09-19 09:45:50 +02:00
export default {
ssr: true,
2018-09-19 09:45:50 +02:00
srcDir: 'src/site/',
head: {
title: Util.config.serviceName,
titleTemplate: `%s | ${Util.config.serviceName}`,
2019-03-12 08:43:14 +01:00
// TODO: Add the directory with pictures for favicon and stuff
2018-09-19 09:45:50 +02:00
meta: [
{ charset: 'utf-8' },
2019-03-12 08:43:14 +01:00
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'theme-color', name: 'theme-color', content: `${Util.config.metaThemeColor}` },
{ hid: 'description', name: 'description', content: `${Util.config.metaDescription}` },
{ hid: 'keywords', name: 'keywords', content: `${Util.config.metaKeywords}` },
{
hid: 'apple-mobile-web-app-title',
name: 'apple-mobile-web-app-title',
content: `${Util.config.serviceName}`
},
{ hid: 'application-name', name: 'application-name', content: `${Util.config.serviceName}` },
2021-01-20 17:36:45 +01:00
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary' },
{ hid: 'twitter:site', name: 'twitter:site', content: `${Util.config.metaTwitterHandle}` },
{ hid: 'twitter:creator', name: 'twitter:creator', content: `${Util.config.metaTwitterHandle}` },
{ hid: 'twitter:title', name: 'twitter:title', content: `${Util.config.serviceName}` },
{ hid: 'twitter:description', name: 'twitter:description', content: `${Util.config.metaDescription}` },
{ hid: 'twitter:image', name: 'twitter:image', content: `/logo.png` },
{ hid: 'og:url', property: 'og:url', content: `/` },
2019-03-12 08:43:14 +01:00
{ hid: 'og:type', property: 'og:type', content: 'website' },
{ hid: 'og:title', property: 'og:title', content: `${Util.config.serviceName}` },
{ hid: 'og:description', property: 'og:description', content: `${Util.config.metaDescription}` },
{ hid: 'og:image', property: 'og:image', content: `/logo.png` },
{ hid: 'og:image:secure_url', property: 'og:image:secure_url', content: `/logo.png` },
{ hid: 'og:site_name', property: 'og:site_name', content: `${Util.config.serviceName}` }
2018-09-19 09:45:50 +02:00
],
link: [
2019-03-12 08:43:14 +01:00
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Nunito:300,400,600,700' },
// This one is a pain in the ass to make it customizable, so you should edit it manually
{ type: 'application/json+oembed', href: `/oembed.json` }
]
2018-09-19 09:45:50 +02:00
},
plugins: [
2019-03-28 16:35:22 +01:00
'~/plugins/axios',
2018-09-19 09:45:50 +02:00
'~/plugins/buefy',
'~/plugins/v-clipboard',
'~/plugins/vue-isyourpasswordsafe',
2019-03-29 04:28:16 +01:00
'~/plugins/vue-timeago',
'~/plugins/vuebar',
2020-07-07 01:02:59 +02:00
'~/plugins/notifier',
'~/plugins/handler'
2018-09-19 09:45:50 +02:00
],
css: [],
modules: ['@nuxtjs/axios', 'cookie-universal-nuxt'],
router: {
linkActiveClass: 'is-active',
linkExactActiveClass: 'is-active'
},
env: {
development: process.env.NODE_ENV !== 'production',
version: process.env.npm_package_version,
serviceName: Util.config.serviceName,
maxFileSize: Util.config.maxSize,
chunkSize: Util.config.chunkSize,
publicMode: Util.config.publicMode,
userAccounts: Util.config.userAccounts
},
2019-03-28 16:35:22 +01:00
axios: {
baseURL: `${process.env.NODE_ENV === 'production' ? '' : 'http://localhost:5000'}/api`
2019-03-28 16:35:22 +01:00
},
2018-09-19 09:45:50 +02:00
build: {
extractCSS: process.env.NODE_ENV === 'production',
postcss: {
preset: {
autoprefixer
}
},
extend(config, { isDev }) {
// Extend only webpack config for client-bundle
if (isDev) {
2021-03-23 14:35:36 +01:00
config.devtool = 'source-map';
}
}
}
2018-09-19 09:45:50 +02:00
};