-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.js
91 lines (89 loc) · 2 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
require("dotenv").config();
module.exports = {
mode: "universal",
/*
** Headers of the page
*/
head: {
title: "thisdot",
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{
hid: "description",
name: "description",
content: "this dot interview project",
},
],
link: [{ rel: "icon", type: "image/x-icon", href: "/logo.png" }],
},
/*
** Customize the progress bar color
*/
loading: { color: "#0366d6", height: "3px", continuous: true },
/*
** Css files imported
*/
css: ["~/assets/global/main.scss", "~/assets/global/grid/flexible-grid.scss"],
/*
** Plugins Imported
*/
plugins: [
{ src: "~/plugins/globalMixins" },
{ src: "~/plugins/axios-config" },
],
/*
** Modules Imported
*/
modules: [["@nuxtjs/axios"], ["@nuxtjs/apollo"], ["@nuxtjs/style-resources"]],
/*
** Style variables Imported
*/
styleResources: {
scss: ["assets/global/mixins.scss", "assets/global/variables.scss"],
},
/*
** Environment variables Imported
*/
env: {
BASE_URL: process.env.BASE_URL,
GITHUB_TOKEN: process.env.GITHUB_TOKEN,
},
// Give axios module options
axios: {
/* set baseURL environment variable to configure access to the API
*/
baseURL: process.env.BASE_URL,
},
// Give apollo module options
apollo: {
defaultOptions: {
$query: {
loadingKey: "loading",
fetchPolicy: "cache-and-network",
},
},
clientConfigs: {
default: "@/apollo/client-config.js",
},
},
/*
** Build configuration
*/
build: {
/*
** Run ESLint on save
*/
extend(config, { isDev, isClient }) {
config.resolve.alias["vue"] = "vue/dist/vue.common";
if (isDev && isClient) {
config.module.rules.push({
enforce: "pre",
test: /\.(js|vue)$/,
loader: "eslint-loader",
exclude: /(node_modules)/,
});
}
},
},
};