-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
134 lines (126 loc) · 3.02 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
125
126
127
128
129
130
131
132
133
134
import pkg from './package'
import { meta } from './plugins/meta'
// Handles production env variables when building (These can be public)
const envVars = process.env.DEPLOY_ENV === 'GH_PAGES' || process.env.DEPLOY_ENV === 'PRODUCTION' ? {
env: {
NUXT_ENV_FIREBASE_API_KEY: 'AIzaSyDGa7alU0NhfBATSQ6CalkY4Za9wWPrM7o',
NUXT_ENV_FIREBASE_AUTH_DOMAIN: 'nwplus-ubc.firebaseapp.com',
NUXT_ENV_FIREBASE_DATABASE_URL: 'https://nwplus-ubc.firebaseio.com',
NUXT_ENV_FIREBASE_PROJECT_ID: 'nwplus-ubc',
NUXT_ENV_FIREBASE_STORAGE_BUCKET: 'nwplus-ubc.appspot.com',
NUXT_ENV_FIREBASE_MESSAGING_SENDER_ID: '306881258768',
NUXT_ENV_FIREBASE_APP_ID: '1:306881258768:web:bc922148732abee79f7195',
mailingListUrl: 'https://us-central1-nwplus-ubc-dev.cloudfunctions.net/addToMailingList'
}
} : {
env: {
mailingListUrl: 'https://us-central1-nwplus-ubc-dev.cloudfunctions.net/addToMailingList'
}
}
export default {
...envVars,
mode: 'spa',
/*
** Headers of the page
*/
hooks: {
'generate:page': (page) => {
page.html = meta(page)
}
},
head: {
title: 'HackCamp 2020',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.png' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [],
/*
** Plugins to load before mounting the App
*/
plugins: [
'~/plugins/firebase.js'
],
/*
** Cache static resources for better performance.
*/
render: {
static: {
maxAge: 1000 * 60 * 60 * 24 * 1
}
},
/*
** Nuxt.js modules
*/
modules: [
[
'nuxt-fontawesome',
{
imports: [
{
set: '@fortawesome/free-brands-svg-icons',
icons: ['fab']
}
]
}
],
'@nuxtjs/dotenv',
'@nuxtjs/axios',
'@nuxtjs/svg-sprite',
'nuxt-buefy',
'@nuxtjs/toast',
[
'nuxt-buefy',
{
/* buefy options */
}
],
[
'@nuxtjs/google-analytics',
{
id: 'UA-172083124-1',
dev: false
}
],
['vue-scrollto/nuxt', { offset: -80 }],
'@nuxtjs/style-resources'
],
styleResources: {
scss: ['scss/hackcamp.scss']
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/,
options: {
fix: true
}
})
}
}
}
}