-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
187 lines (182 loc) · 4.32 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// const getRoutes = require("./build-helpers/getRoutes");
const redirectSSL = require("redirect-ssl");
export default {
target: 'server',
// generate: {
// fallback: true,
// routes() {
// return getRoutes();
// }
// },
// Headers of the page
head: {
title: "Kokebokami",
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{
hid: "description",
name: "description",
content: process.env.npm_package_description || ""
},
{
hid: "keywords",
name: "keywords",
content:
"save recipes, manage recipes, online recipes, recipes, online cookbook, shopping lists, share recipes"
},
{
hid: "title",
name: "title",
content: "Kokebokami"
},
{
hid: "og:title",
property: "og:title",
content: "Kokebokami"
},
{
hid: "og:url",
property: "og:url",
content: `https://kokebokami.com/`
},
{
hid: "og:type",
property: "og:type",
content: "website"
},
{
hid: "og:image",
property: "og:image",
content:
"https://firebasestorage.googleapis.com/v0/b/kokebokami-e788f.appspot.com/o/images%2Fglobals%2Fkokebokami-assets%2FlogoK.png?alt=media&token=d0a53dcc-a160-4384-a3e4-2910943e3d06"
},
{
property: "fb:app_id",
content: "1354921524668944"
}
],
link: [{ rel: "icon", type: "image/png", href: "/favicon.png" }]
},
// Customize the progress-bar color
loading: { color: "#ff7300" },
// Global CSS
css: ["~/assets/scss/main.scss"],
plugins: [
"~/plugins/globalComponents.js",
"~/plugins/router-auth.client.js"
],
vendor: ["axios", "babel-polyfill"],
router: {
middleware: ["router-auth"],//, "redirect-trailing-slash"],
linkExactActiveClass: "active-link",
linkActiveClass: null
},
pageTransition: "fade",
// Nuxt.js dev-modules
babel: {
presets: ["es2015", "stage-0"],
plugins: [
[ "transform-runtime", { polyfill: true, regenerator: true } ]
]
},
buildModules: [
[
"@nuxtjs/google-gtag",
{
id: process.env.GOOGLE_PROPERTY_ID
}
],
[
"@nuxtjs/google-analytics",
{
id: "UA-108483738-5"
}
],
'@nuxtjs/fontawesome'
],
serverMiddleware: [
redirectSSL.create({
enabled: process.env.NODE_ENV === "production"
}),
"~/modules/redirectToTrailingSlash.js",
"~/api/send-email.js",
"~/api/sitemap.js"
],
// Nuxt.js modules
modules: [
"nuxt-i18n",
"@nuxtjs/firebase",
"@nuxtjs/axios",
"nuxt-svg-loader"
],
i18n: {
vueI18nLoader: true,
detectBrowserLanguage: {
useCookie: true,
cookieKey: "i18n_redirected",
alwaysRedirect: true
},
objectNotation: true,
baseUrl: "https://kokebokami.com",
locales: [
{
name: "Norsk",
code: "no",
iso: "no-NO",
file: "no-NO.js"
},
{
name: "English",
code: "en",
iso: "en-US",
file: "en-US.js"
}
],
lazy: true,
langDir: "lang/",
defaultLocale: "en"
},
firebase: {
config: {
apiKey: process.env.API_KEY,
authDomain: process.env.AUTH_DOMAIN,
databaseURL: process.env.DATABASE_URL,
projectId: process.env.PROJECT_ID,
storageBucket: process.env.STORAGE_BUCKET,
messagingSenderId: process.env.MESSAGING_SENDER_ID,
appId: process.env.APP_ID,
measurementId: process.env.MEASUREMENT_ID
},
services: {
auth: {
persistence: "local",
// it is recommended to configure either a mutation or action but you can set both
initialize: {
onAuthStateChangedAction: "ON_AUTH_STATE_CHANGED"
},
ssr: false
},
database: true,
storage: true
},
terminateDatabasesAfterGenerate: true
},
pwa: {},
fontawesome: {
component: "fa",
icons: {
regular: ['faStar', 'faClock'],
solid: ['faSlidersH', 'faStar'],
brands: ['faFacebookSquare', 'faFacebookF']
}
},
// Build configuration
build: {
babel: {
plugins: [
['@babel/plugin-proposal-private-property-in-object', { loose: true }]
],
}
}
};