forked from telepresenceio/telepresence.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
104 lines (100 loc) · 3.34 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
99
100
101
102
103
104
// Many packages in the build process have built-in sanity checking; we want CI
// to be able to run those checks to catch mistakes.
//
// Many of these packages, such as 'react-dom' and 'gatsby-link' only do that
// sanity checking in NODE_ENV == 'development', or at least NODE_ENV !=
// 'production'. This is problematic because `gatsby build` forcefully sets
// NODE_ENV='production', and ignores whatever the user actually set NODE_ENV
// to. And `gatsby develop` doesn't help, because it won't eagerly process
// every page (and even if it did, a lot of the errors would end up in the
// browser console when you go to that page, and not in the terminal).
//
// So, give the user an escape hatch to undo what `gatsby build` did.
process.env.NODE_ENV = process.env.OVERRIDE_NODE_ENV || process.env.NODE_ENV;
module.exports = {
siteMetadata: {
title: "Telepresence",
siteURL: "https://www.telepresence.io"
},
plugins: [
// We have a bunch of documentation subtree'd in at ./docs/
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'docs',
path: `${__dirname}/docs/`,
},
},
// Plugins adding support for additional filetypes in ./docs/
{
resolve: 'gatsby-plugin-mdx',
options: {
extensions: [`.md`],
gatsbyRemarkPlugins: [
{
resolve: 'gatsby-remark-autolink-headers',
options: {
enableCustomId: true,
},
},
],
},
},
{
resolve: 'gatsby-plugin-less',
},
// Plugins adding support for additional filetypes in ./src/assets/
{
resolve: 'gatsby-plugin-react-svg',
options: {
rule: {
include: /\.inline\.svg$/,
},
},
},
// We have some fancy page metadata
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'frontmatter-schema',
path: `${__dirname}/src/frontmatter-schema/`,
},
},
{
resolve: 'gatsby-remark-reading-time',
},
// We need this in order to set things in <head> in the HTML. Otherwise it
// gets set by client-side in the DOM after page-load.
{
resolve: 'gatsby-plugin-react-helmet',
},
// Gatsby actions.createRedirect does nothing by default; it needs a
// server-specific backend to actually work.
{
// gatsby-plugin-netlify is a bummer because it doesn't work with `gatsby
// serve` and the `netlify` CLI's server is pretty wildly different than
// Netlify's actual server :( But to get redirects working well, we do
// need integration with the server, and we do host on Netlify...
resolve: `gatsby-plugin-netlify`,
// There are a lot of "pros" to gatsby-plugin-meta-redirect, but it
// removes URL fragments when following the redirect, which is a
// show-stopper because the Telepresence 1 CLI prints out URLs with
// fragments.
//
//resolve: 'gatsby-plugin-meta-redirect',
},
// Dump the GraphQL schema so that ESLint can take advantage of that info.
{
resolve: 'gatsby-plugin-extract-schema',
},
// This adds the Google Analytics pixel
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: 'GTM-KMVFH7G',
// We only want to load it in production
includeInDevelopment: false,
},
},
],
};