-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
98 lines (97 loc) · 2.16 KB
/
gatsby-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
const {
author,
description,
homepage,
keywords,
repository,
} = require(`./package.json`);
const { PRIMARY_COLOR } = require(`./codegen/env`);
require(`dotenv`).config();
module.exports = {
siteMetadata: {
repo: repository.url.replace(/\.git$/, ''),
title: `CMSClubs`,
description,
homepage,
keywords,
author,
},
// This is required to make development server to match prod endpoint
developMiddleware: (app) => {
const { createProxyMiddleware } = require(`http-proxy-middleware`);
app.use(
`/.netlify/functions/`,
createProxyMiddleware({
target: `http://localhost:9000`,
pathRewrite: {
'/.netlify/functions': ``,
},
}),
);
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-source-graphql`,
options: {
headers: {
Authorization: `Bearer ${process.env.GRAPHCMS_TOKEN}`,
},
url: process.env.GRAPHCMS_ENDPOINT,
typeName: `GraphCMS`,
fieldName: `gcms`,
},
},
{
resolve: `gatsby-plugin-sass`,
options: {
cssLoaderOptions: {
camelCase: false,
},
},
},
{
resolve: `gatsby-plugin-react-svg`,
options: {
rule: {
include: /images/,
},
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: process.env.GOOGLE_ANALYTICS_TRACKING_ID,
respectDNT: true,
anonymize: true,
defer: true,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `cms-clubs`,
short_name: `cms-clubs`,
start_url: `/`,
background_color: `#ffffff`,
theme_color: PRIMARY_COLOR,
display: `minimal-ui`,
icon: `src/images/logo.svg`,
icon_options: {
purpose: `maskable`,
},
},
},
`gatsby-plugin-mini-css-class-name`,
`gatsby-plugin-offline`,
],
};