forked from wuminzhe/sotd-www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.js
102 lines (101 loc) · 2.77 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
const env = {
apiUrl: process.env.API_URL || 'https://api.stateofthedapps.com/',
googleAnalytics: process.env.GOOGLE_ANALYTICS || 'UA-000000-1',
mapboxKey: process.env.MAPBOX_KEY,
mixpanel: process.env.MIXPANEL,
mode: process.env.MODE || 'universal',
linkexchangeRecipientAddress: process.env.LINKEXCHANGE_RECIPIENT_ADDRESS || '0x65bCF0A60B3974931a4459c32ef4043262bc370c',
linkexchangeTillDate: process.env.LINKEXCHANGE_TILL_DATE || '5/31/2018',
linkexchangeWhitelistAddress: process.env.LINKEXCHANGE_WHITELIST_ADDRESS || '0x65bCF0A60B3974931a4459c32ef4043262bc370c'
}
module.exports = {
build: {
/*
** Run ESLINT on save
*/
extend (config, { isClient }) {
if (isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
},
vendor: [
'axios',
'mixpanel-browser',
'smoothscroll-polyfill',
'vue-clickaway',
'webfontloader'
]
},
generate: {
routes: [
'/'
]
},
/*
** mode: 'spa' is the other option: https://nuxtjs.org/api/configuration-mode
*/
mode: env.mode,
modules: [
'@nuxtjs/sentry',
'@nuxtjs/router',
['@nuxtjs/google-analytics', { id: env.googleAnalytics }]
],
serverMiddleware: [
'redirect-ssl'
],
css: [
{ src: '~/assets/css/main.scss', lang: 'scss' }
],
env: {
apiUrl: env.apiUrl,
mapboxKey: env.mapboxKey,
linkexchangeRecipientAddress: env.linkexchangeRecipientAddress,
linkexchangeTillDate: env.linkexchangeTillDate,
linkexchangeWhitelistAddress: env.linkexchangeWhitelistAddress,
mixpanel: env.mixpanel
},
head: {
title: 'State of the ÐApps — Projects Built on Ethereum',
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: 'The curated list of decentralized applications' },
{ name: 'theme-color', content: '#222' }
],
link: [
{
rel: 'apple-touch-icon',
href: '/apple-touch-icon.png',
sizes: '180x180'
},
{
rel: 'icon',
href: '/favicon-32x32.png',
sizes: '32x32'
},
{
rel: 'icon',
href: '/favicon-16x16.png',
sizes: '16x16'
},
{
rel: 'manifest',
href: '/manifest.json'
}
]
},
loading: { color: '#333' },
plugins: [
{ src: '~/plugins/polyfills', ssr: false },
{ src: '~/plugins/vue-config' },
{ src: '~/plugins/vue-filters' },
{ src: '~/plugins/mixpanel', ssr: false },
{ src: '~/plugins/webfontloader', ssr: false },
{ src: '~/plugins/clipboard', ssr: false }
]
}