-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.js
142 lines (141 loc) · 3.27 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
import webpack from "webpack";
export default {
mode: "universal",
/*
** Headers of the page
*/
head: {
title: "Piti",
meta: [
{ charset: "utf-8" },
{
name: "viewport",
content:
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes, viewport-fit=cover",
},
{
hid: "description",
name: "description",
content: "Follow along workouts everyday, everywhere",
},
],
link: [
{ rel: "icon", type: "image/x-icon", href: "/icon.png" },
{
rel: "stylesheet",
href:
"https://fonts.googleapis.com/css?family=Nunito:400,600,700,800,900&display=swap",
},
{
rel: "stylesheet",
href:
"https://fonts.googleapis.com/css?family=Teko:300,400,500,600,700&display=swap",
},
{
rel: "stylesheet",
href:
"https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700&display=swap",
},
{
rel: "stylesheet",
href:
"https://fonts.googleapis.com/css2?family=Work+Sans&display=swap",
},
],
},
/*
** Customize the progress-bar color
*/
loading: { color: "#fff" },
layoutTransition: {
name: "page",
},
env: {
endpoint:
process.env.NODE_ENV == "development"
? "http://localhost:1337"
: "https://piti-api.herokuapp.com",
},
/*
** Global CSS
*/
css: [
"~/assets/icons/font/flaticon.css",
"./assets/styles/icons.css",
"~/assets/styles/general.scss",
"~/assets/styles/buttons.scss",
"~/assets/styles/inputs.scss",
"~/assets/styles/text.scss",
"~/assets/styles/other.scss",
"~/assets/styles/layout.scss",
"~/assets/styles/animations.scss",
"~/assets/styles/utilities.scss",
],
/*
** Plugins to load before mounting the App
*/
plugins: [
"~/plugins/filters",
"~/plugins/components.js",
"~/plugins/mixins",
{ src: "~/plugins/initializeStore.js", mode: 'client' },
],
/*
** Nuxt.js dev-modules
*/
buildModules: ["@nuxtjs/style-resources"],
/*
** Nuxt.js modules
*/
modules: ["@nuxtjs/apollo", "@nuxtjs/axios", "@nuxtjs/pwa"],
pwa: {
meta: {
name: "Piti",
},
manifest: {
name: "Piti",
short_name: "Piti",
background_color: "#FDDCBD",
// theme_color: "#FDDCBD",
orientation: "portrait",
display: "fullscreen",
start_url:
process.env.NODE_ENV == "development"
? "http://localhost:3000/dashboard"
: "https://www.piti.live/dashboard",
},
},
apollo: {
tokenName: "piti-token",
clientConfigs: {
default: {
httpEndpoint:
process.env.NODE_ENV == "development"
? "http://localhost:1337/api/graphql"
: "https://piti-api.herokuapp.com/api/graphql",
},
},
},
styleResources: {
scss: ["~/assets/styles/variables.scss"],
},
/*
** Build configuration
*/
build: {
plugins: [
new webpack.ProvidePlugin({
_: "lodash",
}),
],
extend(config, ctx) {
config.module.rules.push({
test: /\.(ogg|mp3|wav|mpe?g)$/i,
loader: "file-loader",
options: {
name: "[path][name].[ext]",
},
});
},
},
};