-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
124 lines (120 loc) · 2.84 KB
/
nuxt.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
const ssrDirectives = require('./src/directives/ssr')
const env = process.env.NODE_ENV === 'production' ?
process.env :
Object.assign({}, require('dotenv').config().parsed, process.env)
if (!env.NODE_ENV) {
throw new Error('NODE_ENV variable must be defined')
}
if (!env.API_URL) {
throw new Error('API_URL variable must be defined.')
}
module.exports = {
srcDir: 'src/',
env,
head: {
htmlAttrs: {
lang: 'pl-PL',
},
title: 'Koło Naukowe IT - Politechnika Krakowska',
meta: [
{
charset: 'utf-8',
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0',
},
{
hid: 'description',
name: 'description',
content: 'Nuxt.js project',
},
],
script: [],
link: [
{
rel: 'shortcut icon',
type: 'image/x-icon',
href: '/favicon.ico',
},
{
rel: 'preconnect',
href: env.API_URL,
crossorigin: 'anonymous',
},
{
rel: 'stylesheet preload',
as: 'style',
href: 'https://use.fontawesome.com/releases/v5.0.10/css/all.css',
integrity: 'sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg',
crossorigin: 'anonymous',
},
{
rel: 'stylesheet preload',
as: 'style',
href: 'https://cdn.rawgit.com/konpa/devicon/df6431e323547add1b4cf45992913f15286456d3/devicon.min.css',
},
{
rel: 'stylesheet preload',
as: 'style',
href: 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600&subset=latin,latin-ext',
},
{
rel: 'stylesheet preload',
as: 'style',
href: 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css',
},
],
},
loading: {
color: '#3B8070',
},
plugins: [
'~/plugins/prevent-scroll.js',
'~/plugins/vue-markdown.js',
'~/plugins/vue-config-manager.js',
'~/plugins/inject-directives.js',
],
render: {
bundleRenderer: {
directives: {
...ssrDirectives,
},
},
},
modules: [
[
'@nuxtjs/axios', {
credentials: false,
},
],
[
'bootstrap-vue/nuxt', {
css: false,
},
],
[
'@nuxtjs/google-analytics', {
id: 'UA-115202685-1',
},
],
],
router: {
middleware: ['is-mobile'],
},
css: [
'~/assets/scss/custom-components/vue-scrollbar.scss',
'../node_modules/normalize.css/normalize.css',
'~/assets/bootstrap/custom.scss',
'~/assets/scss/main.scss',
],
build: {
extend (config) {
const vueLoader = config.module.rules.find(rule => rule.loader === 'vue-loader')
vueLoader.options = Object.assign({}, vueLoader.options, {
preserveWhitespace: false,
})
},
plugins: [],
},
}