forked from pavel-lens/withdecred.org
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.js
148 lines (145 loc) · 4.22 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
require('dotenv').config()
module.exports = {
mode: 'universal',
telemetry: true,
/*
** Headers of the page
*/
head: {
title: 'Stakeholder-governed sound money',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: 'withDecred.org - Stakeholder-governed sound money',
},
{
hid: 'description',
name: 'description',
content: 'withDecred.org - Stakeholder-governed sound money',
},
{ name: 'msapplication-TileColor', content: '#ffffff' },
{ name: 'theme-color', content: '#ffffff' },
{ name: 'apple-mobile-web-app-title', content: 'withDecred.org' },
{ property: 'og:title', content: 'withDecred.org' },
{
property: 'og:description',
content: 'withDecred.org - Stakeholder-governed sound money',
},
{ property: 'og:image', content: 'https://withDecred.org/social-preview.jpg' },
{ property: 'og:url', content: 'https://withDecred.org/' },
{ property: 'og:site_name', content: 'withDecred.org' },
{ property: 'og:type', content: 'website' },
{ property: 'og:locale', content: 'en_EN' },
{ name: 'twitter:title', content: 'withDecred.org' },
{
name: 'twitter:description',
content: 'withDecred.org - Stakeholder-governed sound money',
},
{ name: 'twitter:image', content: 'https://withDecred.org/social-preview.jpg' },
{ name: 'twitter:card', content: 'summary_large_image' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
'@/assets/_reset.scss',
'element-ui/lib/theme-chalk/index.css',
'@/assets/_global.scss',
'@/assets/_fonts.scss',
],
/*
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/element-ui',
{ src: '@/plugins/sticky-directive.js', mode: 'client' },
],
/*
** Nuxt.js dev-modules
*/
buildModules: ['@nuxt/typescript-build'],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv',
'@nuxtjs/style-resources',
'@marcdiethelm/nuxtjs-countly',
],
/*
** Countly tracker configuration
*/
countly: {
// Required, the URL of your Countly server
url: 'https://analytics.withdecred.org',
// Required, copy from server's management > apps page
app_key:
process.env.ANALYTICS_ENABLED === 'true' && process.env.ANALYTICS_KEY,
// For self-hosting... use original .js or .min.js (minified)
trackerSrc: '/countly.min.js',
// Automatic tracking, if not array this defaults to ['track_sessions', 'track_pageview', 'track_links']
trackers: null,
// Append a <noscript> tag with tracking pixel <img> to <body>, default: true
noScript: true,
// Log Countly debug info to console, default: false
debug: process.env.NODE_ENV !== 'production',
},
/*
** Style resources
*/
styleResources: {
scss: [
//
'./assets/_variables.scss',
'./assets/_responsive.scss',
],
},
/*
** Build configuration
*/
build: {
transpile: [/^element-ui/],
/*
** You can extend webpack config here
*/
extend(config, ctx) {
// Load SVG files as components
// https://vue-svg-loader.js.org/
// Replace all existing rules which include SVG files
const svgRule = config.module.rules.find(rule => rule.test.test('.svg'))
svgRule.test = /\.(png|jpe?g|gif|webp)$/
// Create new rule for SVG loading
config.module.rules.push({
test: /\.svg$/,
oneOf: [
{
resourceQuery: /inline/,
use: ['babel-loader', 'vue-svg-loader'],
},
{
loader: 'file-loader',
query: {
name: 'assets/[name].[hash:8].[ext]',
},
},
],
// loader: 'vue-svg-loader',
// options: {
// svgo: {
// plugins: [{ removeDimensions: true }, { removeViewBox: false }],
// },
// },
})
},
},
}